President Reagan expressed confidence yesterday that Prime Minister Yasuhiro Nakasone will keep his commitment to open Japan's markets to American products and said he remains opposed to protectionist bills under consideration by Congress.

The president, in an interview with The Washington Post, said two personal envoys who saw Nakasone in Tokyo over the weekend were "assured that he is going to continue doing his utmost to bring about some changes" that could lead to an easing of the United States' $36.8 billion trade deficit with Japan.

"So . . . we'll just have to wait and see what he can accomplish," the president said.

Reagan was interviewed as trade relations between the United States and Japan stood at their lowest point in the post-World War II period, with the tension threatening the close strategic as well as economic ties that have developed between the two nations. The president appeared anxious to downplay the differences -- which led to a 92- to-0 Senate vote last week urging him to retaliate against Japan for its protectionist trade practices -- and to reaffirm his close "Ron and Yasu" relationship with Nakasone.

The current talks arose from the January meeting between Reagan and Nakasone, when the two leaders agreed that Japan should open its markets to competitive American products. They set four areas for the initial talks: telecommunications, wood and paper products, sophisticated electronics, and pharmaceuticals and medical equipment.

In a comment yesterday, Secretary of State George P. Shultz underscored the importance the administration puts on Nakasone's commitment to open Japan's markets.

"The U.S. market has been more open than the Japanese have made theirs open to us and to other countries," Shultz said after a speech to a national Blacks in Higher Education conference here. "They just have to open up more if they are to be a responsible partner. It is very frustrating and difficult, but I think there will be progress."

At a White House briefing before the president's interview with The Post, spokesman Larry Speakes said Nakasone's government had failed in regulations issued yesterday to meet U.S. objectives to give American companies equal access to the newly denationalized Japanese telecommunications market, the current focus of the trade dispute.

Speakes added, however, that the White House is hopeful that the U.S. objectives will be reached as a result of the new commitments by the Japanese to Reagan's personal envoys who undertook a special weekend mission to Tokyo. They are Gaston Sigur, a Japan specialist on the National Security Council staff who is a longtime friend of Nakasone's, and Commerce Undersecretary Lionel H. Olmer, the chief U.S. telecommunications negotiatior.

To meet the U.S. objective of giving American telecommunications suppliers the same free access to Japan's market that Japanese companies have in this country, a senior administration official acknowledged that the Nakasone government would have to rewrite the regulations issued yesterday.

"The trip to Tokyo was an opportunity to present some proposals for breaking the logjam," the official added. The official said that "pending analysis," the White House considers the Nakasone response is "a welcome development."

Speakes declined to give any details of the commitments Sigur and Olmer brought with them from Tokyo. But Sen. John C. Danforth (R-Mo.) quoted Olmer as telling him that as a result of Nakasone's becoming personally involved in the talks, the new commitments give the United States "most, but not all" of its objectives.

Danforth, chairman of the Senate Finance Committee's trade panel, said he is "skeptical" about Olmer's characterization of the new telecommunications commitments.

"The proof of the pudding is in the sales," he said. "No matter what they announce, there's a lot of slippage between a general commitment by the prime minister and actual sales."

President Reagan had no doubts about Nakasone's commitment, however. "Well, I'm going to place my confidence in Prime Minister Nakasone and confidence that he wants to arrive at a solution to these trade problems as much as we do," Reagan said in his interview.

"And, of course, just as I do, he's got some political problems," the president added in an obvious reference to factions within Nakasone's ruling Liberal Democratic Party who oppose efforts to increase Japanese imports.

Key congressmen have insisted that bills now in the works are necessary retaliation against Japan's unfair trade practice of closing its market to competitive U.S. products -- not protectionist legislation. The Senate Finance Committee will meet today to consider a bill that would convert the nonbinding resolution passed last week by the Senate into legislation that would mandate presidential retaliation against Japan. The House Ways and Means Committee is expected to consider a similar bill today.