The easiest fix is to delete the following file:
/Users/<your username>/Library/Preferences/com.apple.dock.plist
This will fix your problem (as soon as you log out and back in), but it will also reset your Dock position, size, and the icons it contains back to Apple defaults (so you'll have iPhoto, iMovie, etc. back in there). If you don't mind getting your hands a bit dirty, you can avoid this problem by opening up that file in a text editor instead and deleting the XML tags that refer to the images you don't want (just start before the first one and draaaaaaaaaaag). This requires a basic understanding of XML or HTML, though, or at least a bit of deductive reasoning.