Some people are allergic to sulpha group of medications. Your allergic reaction in the penile area could be due to this. Please stop taking sulphamethoxazole. You may take an anti allergic medication like Levocitrazine one twice a day for two days. Please apply Mupirocin ointment to the ulcerated part of your penis.