Bride of Chaotica!

Photonic energy life forms mistake the characters in Tom's holonovel for real people. The holodeck characters interpret this as an attack, and soon Dr. Chaotica tries to wipe them out. The only person that can stop him is Captain Janeway in the role of Queen Arachnia of the Spider People.