Western Europe can be defended effectively under the Intermediate-Range Nuclear Forces (INF) Treaty, NATO's top military commander testified yesterday, disputing his predecessor's charge that the pact could weaken the alliance and subject it to intimidation by superior Soviet-bloc conventional forces.

While it has "some risks," the treaty "will still allow me to carry out my mission . . . to maintain deterrence," Army Gen. John Galvin told the Senate Armed Services Committee in endorsing the treaty and urging ratification.

"We still can strike the targets we need to strike," Galvin said, noting that the North Atlantic Treaty Organization will have hundreds of nuclear-capable aircraft, short-range ballistic missile launchers and thousands of artillery pieces that can deliver weapons.

"Maybe we can't strike as many targets as before, but neither can the Soviets," he said.

Galvin said the risks, including "euphoria" that could impede modernization of other forces and lead to withdrawal of other nuclear weapons from Europe, can be overcome. "Failure to ratify the treaty would have a serious adverse effect on the cohesion of our alliance," he added.

Galvin's testimony contrasted sharply with that of retired general Bernard W. Rogers, who left last June as NATO commander and told the committee Monday that the treaty "puts NATO on the slippery slope of denuclearization," making Western Europe "safe for conventional war" and "subject to intimidation, coercion and eventual neutralization from the threat of aggression" by Warsaw Pact countries.

But Rogers, like Galvin, said Senate rejection of the treaty would be a mistake.

Negotiated last year by President Reagan and Soviet leader Mikhail Gorbachev to eliminate medium- and shorter-range nuclear missiles from Europe and elsewhere, the treaty was also endorsed yesterday by former defense secretaries, including Robert S. McNamara, Elliot L. Richardson, James R. Schlesinger, Harold Brown and Caspar W. Weinberger.

While contending that verification provisions are sufficient to prevent significant Soviet cheating in dismantling INF weapons, several cautioned against relying on the same verification requirements in negotiating a strategic arms reduction treaty. They said the United States will be reluctant to expand on-site inspections sufficiently to assure the more-complicated monitoring of strategic weapons reduction, prompting Sen. Daniel J. Evans (R-Wash.) to suggest that INF critics are "hoist on their own petard" when it is the United States, rather than the Soviets, that stands in the way of more sweeping verification.

Asked why the Soviets agreed to the treaty if it was so disadvantageous, Schlesinger suggested that Gorbachev wants "breathing space," adding that the real question is whether he wants to use it to improve relations or gather strength for confrontation.

Weinberger, McNamara and Brown also said the Soviets appeared eager to eliminate U.S. Pershing II missiles out of fear that they could knock out their command and control centers. Gorbachev "is giving up quite a lot to get one thing he urgently wants," Weinberger said.

Several also disputed a charge by Sen. Jesse Helms (R-N.C.) that the treaty misses the mark by failing to eliminate nuclear explosive devices and guidance systems.

It is the delivery systems, which would be destroyed, that are critical, Schlesinger and Brown said.

U.S. guidance systems are more sophisticated, and it would be a mistake to give Soviets access to them in monitoring their destruction, Schlesinger added.