It isn't legal in most US states. Almost all states have laws that dictate employees working within that state have to be paid in US currency
If you have the option to get USD instead of BTC, then you're much, much better off getting paid the former.