A House Foreign Affairs subcommittee voted yesterday to prohibit covert U.S. support for guerrillas fighting to overthrow the leftist government in Nicaragua unless authorized by a joint resolution of Congress.

The subcommittee also voted down the Reagan administration's request for $50 million in additional military aid this year for the government in El Salvador, which is fighting leftist rebels that the administration contends are supported by Nicaragua and Cuba.

President Reagan last month requested a $110 million emergency package of aid for the Salvadoran government. The House subcommittee voted yesterday to limit U.S. military aid to El Salvador to $50 million a year in 1984 and 1985 and to place stringent new conditions on such aid.

In the Senate, the administration's covert campaign to stop arms flowing through Nicaragua to leftist Salvadoran insurgents and to "pressure" the Nicaraguan government to become more democratic received a strong endorsement from the chairman of the intelligence oversight committee.

Sen. Barry Goldwater (R-Ariz.), after hearing a long closed-door presentation by CIA Director William J. Casey and other senior CIA and State Department officials, issued a statement saying he is convinced that the administration "is not violating the letter or the spirit" of a congressional prohibition, known as the Boland amendment, on U.S. support "for the purpose" of overthrowing the Nicaraguan government.

"A key element of this law relates to the purpose of the U.S. government and not to the expressed purpose of the recipients of any such support," Goldwater said. He added that Casey had reconfirmed to him yesterday that no U.S. activities are aimed at overthrowing the Nicaraguan government, and said, "I am satisfied that the CIA is not violating the letter or the spirit of the Boland amendment."

The strong language voted yesterday by the House subcommittee on U.S.-supported covert actions against Nicaragua must be approved by the full Democratic-controlled House and Republican-controlled Senate. It was reminiscent of the 1976 congressional ban on the CIA's secret war in Angola.

Sponsored by Rep. Michael D. Barnes (D-Md.), it was adopted by a party-line voice vote in the House Foreign Affairs subcommittee on Western Hemisphere affairs in the form of an amendment to the 1984 foreign aid bill. A similar prohibition was killed by the Senate last year.

Also yesterday, Secretary of State George P. Shultz said in a news conference that it would be a "bad mistake" for Congress to undermine "the military security shield" provided by the United States in Central America.

In response to a question about covert activities, he urged Congress to "support the continuity of effort that is necessary in El Salvador and elsewhere."

Shultz' assistant secretary for Latin American affairs, Thomas O. Enders, told the Senate Foreign Relations Committee yesterday that spreading guerrilla warfare inside Nicaragua may prod the Sandinista government toward democratic reforms.

According to the Barnes subcommittee amendment, the United States may not "provide any assistance of any kind or make any expenditure of funds . . . which would have the effect of supporting, directly or indirectly, military or paramilitary operations in or against Nicaragua" unless the president certifies to the House Foreign Affairs Committee and the Senate Foreign Relations Committee that the assistance is in the U.S. national security interest and tells the committees how much money is involved and who is receiving it. Congress must enact a joint resolution approving the assistance.

Deputy Assistant Secretary of State James Michel told the subcommittee that the administration "strongly opposes" the amendment and called it "bad policy . . . bad law . . . one more disincentive to Nicaragua to negotiate a peaceful settlement in Central America."

Shaking his finger at Michel, Gerry E. Studds (D-Mass.) accused the administration of "demolishing the credibility of the United States in the hemisphere" by "supplying ammunition to people who want to shoot their way into power" in Nicaragua.

"In addition to being illegal, inept and unnecessary, it won't work," he said. "The administration's covert action is about as covert as this subcommittee markup."

Rep. Henry J. Hyde (R-Ill.), opposing the amendment, said he is proud of U.S. government action in aiding the anti-Sandinistas.

"Thank God someone in Central America is saying no to the brutal Sandinistas who have stamped out freedom of religion, democracy and freedom of the press," he said.

In the same vein, U.N. Ambassador Jeane J. Kirkpatrick said on CBS Morning News yesterday that the United States has a moral right to support groups fighting to overthrow oppressive governments in places such as Nicaragua and Afghanistan.

"Do you think that the United States should protect the government of Nicaragua against the anger of its own people?" Kirkpatrick asked. "The answer is no . . . ."

In addition to capping aid in fiscal 1984 and 1985 at $50 million a year, the subcommittee approved a Barnes amendment to restrict the number of U.S. advisers in El Salvador to 55, to which the administration has agreed but has said it does not want the limit written into law.

The subcommittee approved an amendment sponsored by Rep. Stephen J. Solarz (D-N.Y.) outlining the tightest and most detailed restrictions on military aid to El Salvador since Congress began requiring the president to certify progress on human rights, land reforms and other issues.

Under the Solarz amendment, the president would be required to certify every six months that the Salvadoran government has achieved greater control over its security forces and tried substantial numbers of those troops responsible for violent acts against Salvadorans and U.S. citizens.

In the Senate committee hearing, Enders refused to discuss covert U.S. policies and said internal Nicaraguan opposition is mounting because of "deep grievances" by Nicaraguans.

He said the young and confident Sandinista leaders "are going to have to get over the sense that they were the start of the isthmus-wide revolution." He characterized the Sandinista takeover in October, 1979, as a "very brief and not very difficult struggle" by 500 Sandinistas "who came out of the mountains" and were joined 2,500 "kids" in the cities. His description drew hisses from part of the audience.

In the last year, Enders said, the appearance of armed opposition inside Nicaragua might "persuade the Sandinistas that they can't continue to pursue their expansionist and repressive course . . . ." He estimated that "several thousand" anti-Sandinista guerrillas "are now active in Nicaragua."

Enders also said the Soviet Union and Cuba have been warned not to enter any conflict in Nicaragua.

Sen. Jesse Helms (R-N.C.) said the issue in the Nicaragua debate is prevention "of a Marxist takeover of Central America." He said the Boland amendment and others will frustrate U.S. foreign policy interests, and warned that, "If Central America falls, we're going to have 10, 15, 20 million refugees flooding across our borders who do not speak English and do not have jobs."