Tough to give a diagnosis without seeing the lesion. The possible causes can include various types of STDs. I would consider being testing for gonorrhea and chlamydia, and possibly herpes.
If any of the tests are positive, then appropriate antibiotics or antivirals may be indicated.
If there is concern about penile cancer - you can consider an ultrasound.
You may want to discuss these options with your personal physician or in conjunction with a dermatology or urology consult.
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