Hmmm, in "standard" Russian, if I'm not mistaken, it would be more correct to say Штирлиц увидел как голубые ели if the meaning is "Shtirlitz saw the gays eating", right? So dropping the как makes the meaning ambiguous (and is an example of "grammatical ellipsis").
Anyway, the joke isn't directly translatable, but I thought of more or less analogous word-play in English:
James Bond once again noticed the woman with the arrogant gaze. "She's so beautiful -- it's too bad that her friends are snobbish homosexuals," he thought.