I'm gonna guess they have a right to a defense under our constitution.
Correct. The 5th and 14th Amendments state no person shall be deprived of life, liberty or property without Due Process of law. If one were not permitted to plead not guilty, that deprives the person of DP.
California Penal Code:
1016. There are six kinds of pleas to an indictment or an
information, or to a complaint charging a misdemeanor or infraction:
1. Guilty.
2. Not guilty.
3. Nolo contendere, subject to the approval of the court. The
court shall ascertain whether the defendant completely understands
that a plea of nolo contendere shall be considered the same as a plea
of guilty and that, upon a plea of nolo contendere, the court shall
find the defendant guilty. The legal effect of such a plea, to a
crime punishable as a felony, shall be the same as that of a plea of
guilty for all purposes. In cases other than those punishable as
felonies, the plea and any admissions required by the court during
any inquiry it makes as to the voluntariness of, and factual basis
for, the plea may not be used against the defendant as an admission
in any civil suit based upon or growing out of the act upon which the
criminal prosecution is based.
4. A former judgment of conviction or acquittal of the offense
charged.
5. Once in jeopardy.
6. Not guilty by reason of insanity.
A defendant who does not plead guilty may enter one or more of the
other pleas. A defendant who does not plead not guilty by reason of insanity shall be conclusively presumed to have been sane at the
time of the commission of the offense charged; provided, that the
court may for good cause shown allow a change of plea at any time
before the commencement of the trial. A defendant who pleads not
guilty by reason of insanity, without also pleading not guilty,
thereby admits the commission of the offense charged.