THE BEGINNING of a new administration is a good moment to dump overboard the law that prohibits Communists from visiting the United States. It was a fooligh law when it was enacted two decades ago. In recent years it has become a constant embarrassment. Worse, it is open to exploitation by precisely the people at whom it was aimed.

That exploitation has been particularly effective in the hands of the Italian Communists. In fact, many of them have traveled in this country; the law permits waivers of the anti-Communist rule for people who are coming merely as tourists, or to visit relatives, or as members of delegations, or for a variety of other reasons. But, repeatedly, prominent Communists have also applied for visas to come here as public figures and to talk about politics. In the past, these applications have consistently been denied. That's where the State Department's present dilemma arises. If these applications should now be granted, the Communist Party in Italy can wave them around as open evidence that the United States is softening in its opposition to them. That's not a message that the State Department wants to deliver. But if the department keeps denying these applications, it make the U.S. government look like yahoos and simpletons.

Two years ago, for example, the State Department denied a visa to Giorgio Napolitano, the Communist Party's spokesman on economic policy. He had been invited here by several universities. Mr. Napolitano is a man of considerable intellectual distinction. To bar him on grounds that he constitutes a menace to the republic, at a time when Washington is full of Eastern European diplomats (not to mention the Peking Chinese) is ludicrous. But to have admitted him in the delicate period before the last election would have seemed a symbolic gesture undercutting the hardpressed Italian government.

For some months the Italian COmmunist paper Unita has had an application pending for a visa to open a permanent bureau in this country. So far, it hasn't been granted, out of the same uneasiness about concessions to the Western European Communist parties. Meanwhile, of course, Tass and the other state-operated news agencies of Eastern Europe are in full swing in Washington.

The remedy to the dilemma is simple: Conngress can repeal those lines of the visa law that make Communist membership and ideas a criterion. Unfortunately, there seems to be great reluctance in Congress to lay hands on these old anti-Communist laws, no matter how harmful they prove. But there will never be a better moment than the present, with no major European elections in prospect.

There's another reason for action that may, in coming months, prove more important than all the others. The Helsinki Treaty puts a special emphasis on "freer movements and contacts" among nations and their citizens. So far Americans have seen this language chiefly as a weapon against Soviet restrictions on travel and other civil rights. President Carter has made it clear that he intends to keep bringing up the Soviets' transgressions against the spirit of the Helsinki agreement. Surely most Americans support him heartily. But if the United States is going to keep pressing the Soviets on this tender point, Americans are going to have to give some attention to the blemishes in this country's own record. One of them is the ideological test for a visa.

If Congress abolishes it, Europeans could come here to talk and to listen, regardless of political stripe. Italian Communists would no longer have a standing invitation to use this country's own bad law to score points. Much more important, this country would have given the world further evidence of its commitment to the Helsinki principle.