Since the IRS taxes barter transactions, is it legal to pay your taxes to the IRS in non-cash payments such as produce or cattle or other goods?
The IRS is only required to accept legal tender as payment. It is not required to accept payment in kind.
This said, if you don't have an ability to pay and don't have sufficient legal tender to make a tax payment, and you don't yourself voluntarily sell property you own to make that payment, the primary remedy of the IRS is to impose a tax lien on all of the property that you own, and it can then foreclose on that property in order to collect the tax debt.
The downside of that is that once you are in a collection phase of the tax collection process, you have already incurred failure to pay tax penalties and you owe interest on unpaid taxes, something that doesn't happen when you pay your tax debts on time in legal tender.
The IRS will also negotiate settlements in cases where the taxpayer genuinely does not have enough legal tender or property to satisfy a tax debt, or if the property that the taxpayer has is not liquid, as part of the collections process. But by assumption in the question, if the taxpayer has property whose value is sufficient to pay the taxpayer's debt to the IRS, this doesn't come up in this question's facts.