Yes, one can repent of moral transgression. The miracle of forgiveness is real, and true repentance is accepted of the Lord.
True repentance involves a change of heart and not just a change of behavior.