Infection would be the most common cause of your symptoms. Getting tested for various diseases like STDs would be a good start. You can also have the prostate examinated via a digital rectal exam to evaluate for prostatitis. If the symptoms continue, a transrectal ultrasound can be considered to rule out an abscess.
If infection has been completely ruled out, you can consider anatomical abnormalities such as a urethral stricture or urethral polyp - each of which can cause pain when urinating. A cystoscopy would be the best test to evaluate for these conditions.
These options can be discussed with your personal physician.
Followup with your personal physician is essential.
This answer is not intended as and does not substitute for medical advice - the information presented is for patient education only. Please see your personal physician for further evaluation of your individual case.
Kevin, M.D.
http://www.straightfromthedoc.com