Now that I think about it, a lot of Star Trek alumni appeared on
"Dream On". The premise of a single, divorced publisher who is constantly dating and having sex with women and is obsessed with movies (and constantly remembering movie moments, which the show illustrates by actually cutting to short black and white clips of those moments) allowed some hilarious opportunities for Star Trek guest stars. It's a very underrated and largely forgotten gem of an HBO show that unfortunately only has the first two of its six seasons on DVD. A lot of future more famous celebrities had really fun parts on the show, like Salma Hayek as the maid of the main character's ex wife!
I can't believe I forgot to mention that Gates McFadden played one of his many, many conquests, as a women grieving over her dead husband who tries to get over her grief by making the main character dress up like the husband when having sex with him! If you ever wanted to see Dr. Crusher ravaged (in one of the most comedic, over-the-top ways possible), you should see the episode
"The Book, The Thief, His Boss, and Her Lover" (another fun movie reference title).

from the show's season 4 in 1993. I can't find the full episode online, but someone put clips of her scenes (including the sex scene)
on Youtube.
Ricardo Montalban also appearaed as a celebrity (not himself) at a fancy dinner party in the season 2 opener -
"The Second Greatest Story Ever Told". The best and funniest thing about Montalban's guest spot is that when other people are talking about his character, we see vintage black and white clips of Montalban from one of his old movies! I'm not familiar with a lot of Bakula's work, but I wouldn't know about any creepy movies he's been in. I checked his IMDB page, but wasn't sure what to look for. Maybe you'd have more luck.