21st episode of the third season of Star Trek: The Next Generation
La Forge must help a shy lieutenant integrate into his engineering team when he discovers the man shirking his responsibilities and retreating into the holodeck to live out his fantasies. Wikipedia