The simple answer is no, you are not required to hire an attorney to file an application to register a trademark with the USPTO. You are permitted to file an application yourself and the filing can be done electronically. There is no law which requires an applicant to hire a lawyer to represent the applicant with the USPTO. In the same manner of thinking, one is almost never required to hire legal representation for any type of legal matter. You are permitted, in most cases, to represent yourself in a murder trial.
The better question is this. Is it advisable to represent yourself at the USPTO. In the opinion of this writer, it is not. An experienced trademark attorney can advise the client with respect to the particular needs of the case. Furthermore, in many cases, it ends up being less expensive to hire a trademark lawyer to file the application properly at the outset, than to pay the lawyer later to amend an application that was improperly filed. Furthermore, a properly filed application is more likely to result in a trademark registration that issues at an earlier date that an improperly filed application. Moreover, in many cases, the Trademark Examiner prefers to deal with a trademark attorney rather than a pro se applicant who is not familiar with the law and the process and who tends to be more emotionally involved with the case. Finally, if your application is so filed sufficiently incorrectly, it may result in the application being denied and no registration resulting.