My understanding is that it's okay to put lotion on the shaft of the penis, but not on the glans. I think it's okay to put it on even there, actually, but if you do then you have to wash it.
I've been having the same problem recently, but I think it might be something more serious. In any case, the situation has been improving significantly in the past few days. All I've been doing is soaking all of it in warm salt water (dissolved 1:25 I think, but I never actually measure anyway; I am just careful not to put a lot in) with the foreskin retracted. And I have to dry thoroughly, but gently especially under the foreskin around the glans.