Tree House of Horror VI - S7-E6
Trivia: In the story where Homer get transported to the 3rd dimension there is a string of hexadecimal numbers floating in space. The string reads: %46%72%69%6E%6B%20%72%75%6C%65%73%21. If you paste these into your browser address bar you can see that these convert to say 'Frink rules!'
Tree House of Horror VI - S7-E6
Trivia: In the segment Homer3, you can see at one point in the background of the 3-D world a tea kettle. This is a reference by the animators to the first object ever digitally animated into 3-D, a kettle. You can also see the number 733, which if you look on a normal phone it spells out PDF, the software they used to make the sequence. There's a special on these on the 7th season DVD's.
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