|Murphy, Silly dog, Guilty dog? a photo by Grimmgirl3 on Flickr|
When you feel guilty it's because you have done or are doing something that is inconsistent or out of alignment with your values and beliefs, or against an external moral standard. Something else - self-interest or a bit of temporary pleasure, perhaps? - motivated you to make a choice.
You won't feel guilty unless you recognize that the choice or the behavior is wrong, as defined by you or by someone else whose opinion matters to you.
Moments of guilt are when you go into parent ego state, judging your actions. "How could you do that? You know that was cheating/lying/violating your diet/hurting their feelings!" Guilt creates an internal negative dialogue, with the intention to cause you to fly right next time and avoid the extra emotional baggage.
The bulk of your values and beliefs are conditioned into you. The most deeply seated ones have been with you since you were a preschooler, the result of early messages from your primary caregivers. So the internal voice of guilt contains an element of other people (probably your parents) and their values.
So guilt can be your friend. When you feel a pull in your gut, it's telling you to stop what you're doing.
Shame, on the other hand, may have nothing to do with what you are doing or what you have done. Shame is feeling badly about who you are, that somehow you are not enough or are not worthy. Sometimes its origins are from a long time ago, sometimes in abuses that go back to childhood, and you might need the assistance of a counselor or other trusted person to talk to in order to get to the bottom of it.
The shameful element of you is a secret that you keep, to the point that you might even speak out against the very quality that you possess. An interesting article about shame can be found here. There have been a number of celebrities and political figures in the news who are "protesting too much" about homosexuality, for instance, and later have been found to be homosexuals themselves, in denial and in shame about it.
Guilt and shame are both negative emotions that prevent you from being the powerful, undiluted, unique you. Hiding them won't get you to the place that you want to go. They won't dissipate - rather, they will lurk under the surface and pop out from time to time. You need to take them out, examine them and their sources, and then you will be able to move forward more effectively and with more peace of mind.