It's not true that there's nothing gay to do in Dubai. If you know where to go there are some v good gay friendly/mixed (very upmarket venues) on a Thursday and Friday night.
I was there only a month or two back and had a great time. That said you need to be totally discreet and respect their laws. Probably best that I don't mention the venues by name here...but with a bit of research you should be able to work it out.
On the beach I didn't see any problems wearing what you would wear in any beach resort in Europe. Don't expect, or even try to pick up - you're asking for trouble.
Have fun - it's an interesting place to visit - if you're willing to respect local laws.