Homer's Paternity Coot - S17-E10
Continuity mistake: When Dr. Hibbert is about to reveal the results of the paternity test, Mason Fairbanks is wearing a blue blazer and black pants. But, when Dr. Hibbert points at him and says "This guy", he has a light blue sweater and blue pants.
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