Trivia: When homer lights his high school diploma on fire and starts singing the "I am so smart" song, when homer misspells smart, that was an actual mistake by Dan Castellaneta, who spelled it s-m-r-t instead of s-m-a-r-t, and then corrected himself.
Trivia: The 'nerd' with the thick glasses is based on the show's creator, Matt Groening.
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