Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) said: "When one of you washes his head with khitmi while in a state of major ritual impurity (junub), and then takes a ritual bath after that, he may wash his head (as well) with water if he wishes."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 9224