Unless the ticket demands your appearance you can pay the fine online.
If you want to attend traffic school in lieu of the fine, that usually requires an appearance in court and would be up to the judge. Not everyone/nor every violation is eligible for traffic school.