Anthropomorphism, or the attribution of human feelings and emotions to animals is a no-no in the scientific community, and for good reason, however I think it is often taken too far, having now formed a general belief in the scientific community that animals don't have emotions unless one is specifically proved scientifically beyond reasonable doubt. Anyone who has actually spent any time with animals would have to be willfully blind not to see that animals do have emotions and, depending on the species of animal, the range of emotions may or may not correspond closely to human ones.
Dogs appear to me to display many/most human emotions and guilt is certainly one of them. Lucy (all too) frequently misbehaves, knows it, and looks guilty whether or not I have observed the act and responded with any sort of reproach. She also displays the 'I'm thinking of doing something bad' guilty look that tritonx talks about. That's the very reason why we keep dogs as pets, we can interact with them emotionally. I'd go as far as to say that the range of emotions that any given species shares with humans is one of the main things which define whether that animal makes a good or a bad pet.
I have a scientific training, but when something looks like a duck, walks like a duck and quacks like a duck...