MADRID, Spain (AP) _ Prime Minister Felipe Gonzalez has called for U.S.-Spanish negotiations on a reduction of the number of American troops in Spain to begin as soon as possible.

Some 12,000 U.S. servicemen are stationed at four bases leased from the Spanish government under a 1953 agreement.

Gonzalez' Socialist government approved a five-year extension of the agreement in 1983, but in his state of the nation address last October the prime minister spoke of a troop reduction. The issue was brought up again in a foreign policy position paper adopted at the Socialists' national convention in December.

Gonzalez made his comments about possible negotiations at a Monday briefing session with American reporters dealing with President Reagan's May 6-8 visit to Spain.

Gonzalez emphasized that any troop-reduction talks would not be linked to a referendum on Spain's continued membership in the North Atlantic Treaty Organization, which is planned for some time early next year.

The U.S. Embassy issued a statement later Monday saying it ''believes the U.S. military presence in Spain makes an important contribution to Spanish, European and alliance (NATO) security.''

It said it would not be ''appropriate for us to speculate on how the U.S. presence in Spain might evolve in the future.''

''We are confident, however, that any questions regarding the U.S. presence in Spain can be resolved within the spirit of cooperation and mutual interest that characterizes our relationship generally and under the bilateral accord.''

Reagan's visit and the issue of U.S. troop strength here arose last week when Richard Burt, assistant secretary of state for European affairs, was quoted in Washington as saying the troop issue was not on the agenda for the Reagan-Gonzalez talks.

The Spanish media interpreted that remark as meaning the Reagan administration refused to discuss troop reductions.

Foreign Minister Fernando Moran was quoted Sunday by the Spanish news agency, EFE, as saying, ''The government will negotiate the troop reduction with the United States before the NATO referendum.''

Spain became the 16th member of NATO in May 1982 when a centrist government was in office. The move was opposed by many left-wing groups.

No date has been set for the referendum to determine if Spain should remain in the alliance.

Gonzalez told reporters that most Spaniards do not like the idea of having foreign troops stationed on Spanish soil.

He noted that Spain did not take part in World War II, and was not liberated by U.S. troops. He said the continued American military presence in other Western European nations is ''directly linked to that liberation.''

''We have to find some way to find an equilibrium with the idea that the U.S. is doing us some sort of favor'' by maintaining troops in Spain, Gonzales added.

The Spanish dictator Gen. Francisco Franco, who died in 1975, won the 1936-39 Civil War with the military backing of Nazi Germany and Fascist Italy, but kept Spain out of World War II. Western European countries refused to allow the Franco government to join NATO.