Hi,
Welcome to the ehealthforum and I am really glad to help you out.One possibility for such a rash is lichen planus whihc is found on penis and is an inflammatory disease that affects the skin and the oral mucosa, and presents itself in the form of papules(flat spots) or rashes which are characterized by its violaceous color.
To confirm the diagnosis you need to get it examined from a dermatologist. Treatment is available only on prescription and consists mainly of steroids,retinoids,hydroquinone and phototherapy.
It is very difficult to precisely confirm a diagnosis without examination and investigations and the answer is based on the medical information provided. For exact diagnosis, you are requested to consult your doctor. I sincerely hope that helps. Take care.