The accused may, at any time before conviction, enter a plea of nolo contendere with the consent of the court. The court may refuse to accept the plea, and shall not accept the plea without first determining that the plea is made voluntarily with an understanding of the nature of the charge.