Sayyiduna Ka'b bin Ujrah (may Allah be pleased with him) said that he was with the Messenger of Allah (peace and blessings be upon him) in the state of ihram and lice were troubling him in his head. The Messenger of Allah (peace and blessings be upon him) ordered him to shave his head and said: "Fast three days, or feed six poor people, a mudd of barley for each poor person, or sacrifice a goat; whichever of these you do will suffice for you."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحج / 9092