LET'S SAY IT straight off: there was nothing illegal about Attorney General William French Smith's $16,500 investment in an oil and gas tax shelter last year that made him eligible for $66,000 in tax deductions. Every taxpayer, including the attorney general, is entitled to take advantage of provisions in the tax code to maximize deductions and minimize tax. No one is under a moral duty to pay more tax than the government requires.

Still, we think the attorney general showed poor judgment. He is both the government's top legal officer and a political appointee. As a legal officer, he is called on to defend Internal Revenue Service determinations that deductions should not be allowed on investments like these; and the theory justifying the deduction on this arrangement was described by one attorney hired to defend it as "most adventurous." He has indicated he would recuse himself from this case, but even so we wonder whether it is appropriate for him to take a deduction that an IRS ruling has opposed.

Even more important, by choosing personally-- this was not a blind trust transaction--to make a $16,000 investment that qualifies him for a $66,000 deduction, Mr. Smith has shown a tin ear for the sound of such a transaction to the ordinary person in these difficult times. Tax shelters may be familiar stuff to most of Mr. Smith's friends. But they are not for the vast majority of Americans. Mr. Smith's action will make it a little harder for administration supporters to convince voters that the primary motive behind its policies is not to further enrich the rich.

This case will lead some to ask why there should be tax shelters at all. The answer is that the tax code is inevitably complex and that, legislators' intent aside, ingenious tax lawyers and accountants will seek out "loopholes" that rich taxpayers can take advantage of. But loopholes that have been discovered can also be closed. This case may well give impetus to efforts to eliminate many tax shelters.

The administration, to its credit, has betrayed an unease with shelters. IRS Commissioner Roscoe Egger has made it a high priority to crack down on tax shelters he considers abusive. Some of the supporters of the Reagan tax cuts argue that one good effect is that they reduce incentives for such investments. Mr. Smith's action, unfortunately, sends a different message.