The United States and Japan settled the last of four contentious trade issues yesterday and agreed to expand negotiations to additional industries in an effort to ease trade friction between the two countries.

Foreign Minister Shintaro Abe arrived in Washington Thursday night with a fresh offer that allowed the last-minute settlement of a dispute over Japan's high tariffs on forest products, an area where agreement had been blocked until now by the politically powerful Japanese lumber industry.

The Abe offer called for immediate cuts in tariffs on some wood products such as fiber board and cuts on other items such as plywood and veneers that would take effect in April 1987. "It was a surprise to all," one State Department negotiator said.

In a meeting with Abe wrapping up the year of intensified trade talks, Secretary of State George P. Shultz said "a great deal has been accomplished" in tearing down Japanese barriers to sales of American manufactured products and cited "very substanial purchases" by Japan as evidence of the success.

He said U.S. sales to Japan increased 6.7 percent last year in the areas covered by the talks -- telecommunications, sophisticated electronics and medical equipment and pharmaceuticals, in addition to forest products. This increase was "well above" the expansion of exports of all manufactured goods to Japan, he added.

"I think we can say this approach has worked, and we plan to continue it," Shultz said. Shultz said products for the new talks will be picked later.

The intensive trade talks were ordered last January by President Reagan and Prime Minister Yasuhiro Nakasone to try to cut Japan's soaring trade surplus with the United States, which last year reached an estimated $50 billion.

"The president and I appreciate the efforts" of Nakasone and Abe "in achieving these successes," said Shultz, who addressed the Japanese foreign minister as "my friend."

Abe replied that Japan is "well aware that the situation is very serious in this country, including mounting pressures for protectionism in Congress" and is "exerting a maximum effort" to ease the trade frictions that threaten to divide the United States from its major Pacific ally.

In negotiations in Tokyo earlier this week, Japan agreed to major changes in regulations that barred sales of such American telecommunications products as pagers, mobile telephones and two-way radios. The Japanese telecommunications market is worth an estimated $5 billion to $7 billion, the second largest in the world after the United States.

U.S. telecommunications sales last year reached an estimated $2.5 billion, including purchases by Japanese companies of two communications satellite systems, said the Commerce Department's Japan specialist, Clyde Prestowitz, who negotiated the final agreement.

Earlier, American negotiators and industry officials expressed satisfaction with the results in the medical equipment and pharmaceuticals field. Major advances were made in opening Japan's electronics market, but three stubborn issues remained: complaints that Japan blocks U.S. semiconductor sales while flooding the American market with its products; a ban on Japanese government purchases of weather and other noncommunications satellites to protect its developing space industry, and commercial practices by Japanese companies that hurt sales of foreign-made goods.

The Japanese, already concerned that their trade policies would be blamed at the economic summit in Tokyo next May for a faltering world economy, were reported to be anxious to have the talks end on a positive note.

The Reagan administration, under strong pressure from Congress, insisted that the final statement reflect the strong differences that remained until yesterday in the forest-products talks as well as the remaining disputes in the other areas. American negotiators, moreover, wanted the process -- called market-oriented, sector specific (MOSS) -- expanded into other industries, while the Japanese wanted it stopped after the first year.

One likely candidate for the expanded talks is the auto-parts industry. U.S. auto-parts makers have complained for years that their competitive products are denied access to Japan, while Japanese companies sell many replacement parts in the United States.

Abe saluted efforts by Japanese industries to buy more American products, including the satellites, a major telephone switching system and Boeing passenger planes. He also revealed that Nissan had agreed to ship some of its cars to the United States on an American-owned ship, which will be built in Japan for Marine Transport Ltd. of Secaucus, N.J.

But he and Shultz agreed that the greatest cuts in the U.S. trade deficit with Japan will come from moves that started in September to increase the value of the yen in relation to the dollar, and in changing the focus of Japanese industries to produce for domestic consumption instead of export.

"The yen-dollar changes will have much more of an impact" than talks aimed at opening Japan's markets to American products, Shultz said.

During the past year, the value of the dollar has decreased about 20 percent in relation to the yen, and Japanese auto and consumer electronics companies have started to increase prices of their products to compensate for the lower relative value of the dollar.