Sorry to hear about your knee issues.
I'm a physical therapist, but also a Cat III road racer and expert mountain biker. Knee problems can get frustrating as a cyclist. I see many competitive cyclists and triathletes athletes here in CO. I also do professional bike fitting for the regional cycling team our clinic sponsors.
There is most likely not a simple solution to your knee pain. Managing your knee pain will most likely involved some specific land based exercises, a professional bike fit, and quite possible a change in some equiptment you have on your bike. It may not be a bad idea to hire a coach that can give you some specific pointers about developing a good solid, efficient pedal stroke and changes in your training programs. Generally, the most common problems I see with a cyclist is: poor bike fit, poor training programs, weak hamstrings, poor foot motor control, decreased back strength, and not enough cross training.