Brother From the Same Planet - S4-E14
Revealing mistake: The shot of Homer saying "Marge, when kids say bad these days, they mean good. And to shake your booty means to wiggle one's butt" is recycled from the opening scene from Life on the Fast Lane. Notice the animation is of a much lower standard than the rest of the episode.
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