
Tree House of Horror IV: The Simpson's Halloween Special IV - S5-E5
Other mistake: When Bart says the picture of the school bus is actually called The Ghoul Bus, Lisa points out the name tag says The School Bus. If you closely at the name tag, you can see nothing is written on it.
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