Tree House of Horror VIII - S9-E4
Other mistake: In 'Homega man', Homer goes into the bomb shelter and does not shut the door, and you can still see it open for a while after he is in there. Herman does not close it behind him - you can tell by his skeleton's position. But Homer opens the door to leave the shelter after he has eaten the food, and it must have been closed for him to have survived the atomic attack, because it vaporised Herman, who was only a few feet away.
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