Flavor physics in SO(10) GUTs with suppressed proton decay due to gauged discrete symmetry