I'm not sure if the above comments really explain the meaning of this sentence. I'm trying to explain it.
"Leuchte" in this case also refers to a woman/girlfriend like "Flamme" does. The difference is, that "Flamme", actually flames from a fire, here refers to
- a sexually attractive woman
- a woman one has just met and is either deeply in love with or feels sexually attracted to.
"Leuchte" actually means lamp, though it does not imply an electrical lamp, but rather one with candles or other open fire in it. It's being used to describe bright, clever people, in this case a woman.
The special use of "Flamme im Bett" (literally translated "flames in bed") and "Leuchte am Schreibtisch" means, that one rather prefers a hot woman in bed (flames, which one would avoid having in bed) than a bright woman at the desk (a lamp with an open fire, which one would rather have at the desk).
I don't think the translation above carries the meaning of the German sentence but I'm also not sure how to translate it correctly, since I don't know words that both deal with open fire but can be used in this specific ways.
@guidot: The double ambiguity is needed here for this sentence to work. At least from my point of view.