Certainly. Many webcams come with motion detection and recording software of some sort. Check the specs.
MPEG video compression actually works by recording just the parts of a picture that are changing - so adding motion detection isn't that hard for them to do.
Ideally you want the system set up to email video clips off site. Otherwise if the crook steals the computer he takes the evidence as well.
See this story..
http://news.bbc.co.uk/1/hi/england/cambridgeshire/4272041.stmOne thing to note is that the quality of the picture recorded is sometimes pretty poor when using cheap webcams in poor lighting. The system in that news article above used a video camera not a web cam. Try a cheap webcam and see what happens. Googling will find you clips from other peoples cameras so you can see what's possible with specific cameras. If the results aren't good enough try pointing the camera directly at the doorway.