A person to whom a petty offense complaint and summons has been issued for an offense other than a violation of traffic laws may, in lieu of appearing in court for the hearing on the complaint, make a stipulation admitting the allegations in the complaint. Such admission shall be filed with the deposit specified in §