I've learned that it's legal to write about famous people without their permission as long as the use is "expressive" rather than advertising. However, I believe it's illegal to use pictures of famous people without their permission. My understanding is that this applies not just to book covers but to the content.
However, would it be legal if the picture was in the form of a political cartoon or satire? For example, imagine writing about a celebrity who was renowned for his connections to organized crime and corrupt politicians. So you create a cartoonish picture showing him standing between some famous gangster and Satan.
EDIT: This hypothetical book would be published in the U.S. and it would be sold commercially.