Any infecetion can lead to these symptoms - and a simple urine test for STDs and urethritis can be considered. You may also consider being tested for prostatitis as well (i.e. via a digital rectal exam).
Being uncircumcized increases your risk of balanitis - which is inflammation on the head of the penis. This can sometimes lead to the symptoms. Good hygeine is essential, but topical antimicrobials can be considered to treat this condition.
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.
Medical Weblog:
kevinmd_b