Unless otherwise authorized by the court, plea agreements in criminal cases shall be in writing and signed by the defendant and counsel.