Sounds like patellofemoral pain to me. Sharp pain isn't typical AFAIK, but the rest of it sounds familiar.
Things to think about:
strengthening the muscles around your hips (making sure your knees don't bow inwards)
releasing any trigger points around the hip muscles (IT band area, quads, adductors, hamstrings)
making sure your seat height isn't too low
making sure your cleats are properly aligned
making sure your crankarms aren't too long
and as you're working on the rest of it, stretching my knees before a ride used to help me.
Speed comes from what you put behind you. - Judi Ketteler