President Reagan's top trade negotiator met last night with a high-level delegation from the European Economic Community in what one European source described as a "last-ditch effort" to prevent skirmishes over agriculture trade subsidies from escalating into a full-scale trade war.

U.S. Trade Representative William E. Brock said he was "moderately optimistic" about the talks, which continued sessions held here in January and in Brussels last month, where U.S. officials pressed their complaints that subsidized European farm products were undercutting American goods in Third World markets.

"We have a lot to talk about," added Brock.

He and Deputy Agriculture Secretary Richard E. Lyng met with EEC Vice President Wilhelm Haferkamp, responsible for the Common Market's external relations, and Commissioner Poul Dalfager, in charge of EEC agriculture affairs, in an atmosphere that the Europeans fear has been "poisoned" by the Reagan administration's sale of $150 million of government-subsidized wheat flour to Egypt.

The sale was about $25 a bushel below the world market price and effectively cut the French out of what they considered their traditional market.

"The community was bitterly resentful of the wheat flour deal," said Ella Krucoff of the EEC's Washington office.

A congressional staff member active in trade issues, however, said the wheat flour sale "succeeded in getting the Europeans' attention" in ways that U.S. statements of concern over export subsidies paid to farmers in Europe never did.

The danger, however, is that the dispute will escalate and harm both Europe and the United States. Sir Roy Denman, head of the EEC's permanent diplomatic mission in Washington, told a meeting of grain industry officials here Wednesday that the only winner in a trade war between the United States and Western Europe would be the Soviet Union--the world's largest importer of farm goods.

"The United States, as the dominant agricultural exporter in the world, would have the most to lose from an all-out trade war," added Michel Fribourg, president of Continental Grain Co.

Europeans, in private conversations with American trade officials, have warned that they are prepared to retaliate if the United States makes another move similar to the wheat flour deal.

Specifically, the Europeans mentioned placing restrictions on the duty-free sales by U.S. farmers of $4 billion a year in corn gluten feed and soy beans to EEC nations.

"If we move against the Europeans," said one knowledgable Capitol Hill staff member, "we will play into the hands of the French, who want to shut us out."

The United States ran a $10 billion trade surplus with Western Europe last year.

The agricultural trade issue, always a particularly knotty one for both Europe and the United States, has been worsened by heavy agricultural surpluses here and a decline in the world price for grain.

Subsidies for European farmers are a cornerstone of the Common Market, in place since its formation, and most Europeans believe the EEC would collapse if they were removed. European farmers--tilling small, inefficient plots--are seen as unable to compete in markets at home and overseas with the United States and its larger, more heavily-mechanized farms.

Farm surpluses thus have built up both in Europe--where farmers, encouraged by Common Market subsidies, grow more than they need--and in the United States, pressures are mounting to get rid of the surpluses.

The United States charged that the Europeans are trying to clear out these surpluses by subsidizing the sale of farm products at prices below those charged at home.