In general, in the United States it is unlawful to deny the tender U.S. currency for "all debts public and private." That said, the lawyer obviously felt, and the judge agreed that you were being unreasonable in your method of payment. Just like the bank that can force you to roll your quarters before even they will accept them en-mass, your lawyer can deny not the form of currency (U.S. dollars), but the denomination in which it is being delivered.
All you had to do was go to the bank and change everything to at least 5s and 10s and you would have been fine. It sounds like you were intentionally being a pain, the judge agreed, and now you're paying the price.