In my experience GPs are not the best people to deal with sporting injuries or related pain. They tend to tell you not to cycle. As a result, the pain goes, but of course returns when you resume cycling. Sports physios are better for treating sport injuries, although you'll have to pay a fee.
How new are you to cycling though? If very new, check you are not pedaling a too-big gear. Your cadence (how fast you turn the pedals) should be a good indicator as to gear size - a big gear will be hard to turn fast, a medium gear will feel easier to turn. You should be able to turn the pedals fairly fast (about 60 revolutions per minute or more) and easily, in a medium gear. Pedaling slowly in a large gear will hurt your knees more.
Too low a saddle height can also hurt your knees so it is worth adjusting the saddle to the height where you can almost straighten your leg, with just a very little knee-bend, when the pedal is at it's lowest point.