RORY: You were a Trekkie?
LUKE: I was not a Trekkie.
LORELAI: Uh uh, I do believe that denying you were a Trekkie is a violation of the Prime Directive.
RORY: Indubitably, captain.
Trekkie: a fan of the Star Trek franchise. Many serious fans dislike the term, preferring “Trekker”. Long stereotyped as hyper-obsessive supernerds, and even satirised by Star Trek itself.
Prime Directive: in Star Trek, the Prime Directive is a guiding principle that prohibits its members from interfering with the natural development of alien civilisations.
“Indubitably, captain”: Possibly the sort of thing Rory thinks that Mr Spock would say to Captain Kirk. The closest thing to it is a piece of dialogue from the 1987 series, Star Trek: The Next Generation, when Data says, “Indubitably, sir. Indubitably” to Captain Picard.
Lorelai is an arch-hypocrite to characterise Luke as a Star Trek nerd because he wore a Star Trek tee-shirt, and make fun of him: she is a huge fan of the show herself, and has made numerous references to it, including to Luke. In fact, she uses Star Trek lingo to make fun of Star Trek, something everyone, but most of all Luke, should have picked her up on.
Also note that Rory has done the same thing in regard to Lane’s erstwhile crush, Rich Bloomenfeld – she made a snarky comment about him wearing the same Star Trek tee shirt every day when he was younger. It’s essentially the same joke as this, with Luke wearing a Star Trek tee-shirt when he was younger. Like Lorelai, Rory is a hypocrite; she has made references to watching Star Trek herself.
Fun fact: the name Lorelei appears in the animated series of Star Trek (1971-present). In the 1973 episode, The Lorelei Signal, a compelling musical signal lures the Enterprise to a remote planet, where the female inhabitants drain the male crew of their life force. During the process, the men’s judgement is affected as they experience euphoric hallucinations – rather like the way men behave around the two Lorelais in Gilmore Girls! In the episode, it is up to the female crew members of the ship to take command and rescue the men, so it’s a real girl power instalment.