Technically yes, if it's rated 100m or higher. But it's still not ideal.
Soap and shampoo residue wears down rubber gaskets over time. Hot water makes gaskets expand and contract, which weakens the seal faster than plain water would.
Take it off before you swim or shower. A dry watch is always a safe watch.