Scuse Me While I Miss the Sky - S14-E16
Continuity mistake: When Skinner opens the door to the room Lisa is in, there is a red book with white rings around it behind the door, it is easily the most noticeable book on the shelf. When the shot cuts back, the book is suddenly blue.
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