Mohammed Ahmed admitted bombarding a woman he was representing in court with unsolicited explicit messages