The Simpsons Halloween Special: Tree House of Horror - S2-E3
Trivia: In the section where the Simpson family is abducted by Kang and Kodos and are being given the tour of the ship, Bart and Lisa make a few wise-cracks, and either Kang or Kodos (Who can tell them apart?) said "Anyone here who has mastered intergalactic travel, raise your hand" and Kang and Kodos raise their hands. This is a joke by the animators, making fun of Alf Clausen, the composer of the music. To end arguments with other people working in the music department he says "Anyone who has composed a Grammy-winning record, raise your hand" and he raises his hand.
The Simpsons Halloween Special: Tree House of Horror - S2-E3
Trivia: During the opening graveyard scene, notice the gravestone which says Paul McCartney. Creator Matt Groening is a big fan of the Beatles, and during the 1960's, a conspiracy theory was being spread that Paul McCartney had been killed in a car crash and was replaced by a lookalike.
Answer: I'm not sure if this is the one you're thinking of, but an episode of "Ray Bradbury Theatre," called "A Sound of Thunder," dealt with a similar matter: a group of hunters travel back in time to hunt dinosaurs, only to find things have changed when they get back because someone stepped on a butterfly.
Xofer