I got this from somewhere else, but does it often occur when you have not done much in the day, drinking little water or only soda/sugary drinks? Apparently, the tip of your penis becomes irritated because of the high levels of alkaline/acidity in your urine.
Drink more water to dilute it. If this always happens coincidentally with (very) yellow urine, it's probably that. Simply drink more water. I'm not a doctor, I just read this elsewhere. Can't hurt to try though!
Oh, and I want to add, what I've learned (I have the same problems as you, I've only recently read this fix so I can't tell you if it works) from past experiences though, is to not touch it. Just leave it alone. If it hurts, leave it alone. It goes away faster.
I hate to be stark- but don't whack off with lotions or oils. Synthetic materials are not natural and will absorb into the urethra and cause troubles/pain... particularly if your system is non-tolerant/irritated/allergic in any way.