Brother From Another Series - S8-E16
Trivia: Sideshow Bob is voiced by Kelsey Grammer, who plays the title role in the hit comedy series Frasier. The voice of Bob's brother Cecil (hence the title of the episode) is provided by David Hyde Pierce, who is Frasier's brother Niles in the show. There are many in-jokes included in the episode - the white type caption on the black background bridges scenes in Frasier, and "Maris" is Niles' wife, never seen but always talked of, for example.
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