Why on earth would it be unsafe?
Any soap/detergent will do - even washing up liquid, but you'll need oodles of conditioner after that.
(And of course I mean only products you handle, not ones for machines - most laundry and all dishwasher ones are unsafe)
Musing on it, the idea that we need separate products for stuff is probably fostered by manufacturers to make us buy more