Perhaps the greatest tribute Congress could pay to the Constitution this bicentennial year is to cleanse our statute books of laws that mock our freedoms. One such law is the McCarran-Walter Act of 1952, a legal relic of McCarthyism that has somehow remained on the books despite its affront to free speech at home and the embarrassment it causes us abroad.

Enacted over President Truman's veto at a time when some thought that the only way to save freedom was to restrict it, the McCarran-Walter Act gives the government blanket authority to exclude or deport foreign visitors on the basis of their political beliefs, affiliations or what they might say once on our shores.

Among the excludables under this law are current and former communists as well as anyone whose admission authorities deem ''prejudicial to the public interest.'' Although most visitors are allowed in and waivers are now issued for communists, all visa applicants must still answer questions about their political affiliations, and hundreds of visas are denied each year because of the broad administrative discretion allowed under the law. The denials usually come without explanation or recourse.

The honor roll of persona non grata includes famous authors, journalists and politicians who by any stretch of the imagination cannot be seen as threats to our nation. Two Latin American Nobel literary laureates have been excluded. So have a former NATO general, an Italian playwright, a Philippine priest, a Canadian naturalist author and the widow of the former president of Chile. Writers are hit particularly hard, ironically because their exercise of free speech makes them more visible targets of exclusion. And no one really knows how many potential visitors are intimidated by the whole process and simply decide not to apply.

Such a law seems surprising in this free land of ours. It is a basic premise of our system that the best defense against a bad idea is a good idea -- not a censored idea. Making policy in a democracy requires an infusion of perspectives from all sources, whether we like what they have to say or not.

McCarran-Walter, however, puts government in the business of selecting which speakers and opinions are appropriate for an American audience. While we like to think of our society as a free market for ideas, the McCarran-Walter Act serves as ideological protectionism. It is censorship by any other name. As President Truman said in his veto message, ''Seldom has a bill exhibited the distrust evidenced here for citizens and aliens alike.''

Defenders of the law argue that the federal government needs the authority to keep people out whose admission might cause serious harm to our foreign policy. They make a valid point. But the McCarran-Walter Act is a vague law that allows broad administrative latitude that can be manipulated and abused for the wrong reasons.

Consider the case of Italian Gen. Nino Pasti, a former NATO official and vice supreme Allied commander in Europe for nuclear affairs who was denied a visa in 1983. Pasti opposed the U.S. deployment of medium-range nuclear missiles in Europe, and the administration feared his influence on public opinion. Thus a foreign-policy consideration was used to abridge our right to receive information. One wonders if Pasti would be more welcome today with the administration in need of political support for a possible arms control accord.

It is a further irony that whatever questionable foreign policy gains we might make by excluding visitors under this law are undermined by the foreign policy losses because of it. McCarran-Walter is viewed as a violation of our Helsinki commitments on travel, movement, human contacts and the free flow of information. Though a trifle compared with Soviet and East European Helsinki violations, it gives those nations a convenient way to defuse our criticism of their massive human rights abuses.

When we raise the problem of Soviet emigration restrictions, they divert the discussion to McCarran-Walter and say that it discriminates against communist nations. When we went to Ottawa in 1985 for the Human Rights Experts Meeting, we were forced to explain why Canadian author Farley Mowat had just been excluded from the United States. We faced the same unnecessary questions at last year's Human Contacts Meeting in Bern and at the ongoing Helsinki Review Meeting in Vienna. The McCarran-Walter Act has become a needless diplomatic distraction.

A bill now pending in the House, sponsored by Rep. Barney Frank, would repeal the ideological exclusion provisions of the McCarran-Walter Act by prohibiting the government from barring entry on the basis of ideology or affiliation. At the same time it would address national security concerns by toughening restrictions on terrorists and excluding anyone expected to commit a criminal act that could endanger our national security.

In this year of the Constitution, it is time to restore our visa laws to their proper foundation, the Bill of Rights. The writer, a Democratic representative from Maryland, is chairman of the Commission on Security and Cooperation in Europe.