It is not against the law to pay officers and directors. But a new nonprofit organization should try to use people willing to volunteer. In a nonprofit organization, money should be used to run the organization and not to pay the board of directors.
The IRS worries about paying the board of directors and employees of nonprofit organizations too much money. If you want income tax exemption, there are a lot of questions on the IRS forms about what you will pay employees. It is best not to pay the people on the board of directors. However, they can be reimbursed for reasonable expenses.