The bold political profile adopted by Prime Minister Yasuhiro Nakasone on a visit to Washington earlier this week has churned up a heated controversy here over how far and how fast he intends to lead Japan to a stronger military role and has confronted him with the first major test of his eight-week-old administration.

The furor was sparked by statements by Nakasone in Washington that Japan should become "an unsinkable aircraft carrier" in defense against the Soviet long-range Backfire bomber and should prevent the passage of Soviet submarines and surface ships in the strategic straits that go through the Japanese islands.

In Japan, a country that suffered a shattering defeat in World War II and where strong antiwar sentiments are only gradually changing, the re- NEWS ANALYSIS marks have touched off a storm of protest in the press and among political opposition parties and elements inside Nakasone's own ruling Liberal Democratic Party.

The controversy, according to political analysts here, has marred an appreciation of the apparent gains Nakasone made during the summit talks in removing some of the rancor in tense economic ties with the United States.

More important, they added, it may damage the domestic political support Nakasone will need to continue to deliver on specific issues of interest to the United States such as dismantling Japan's barriers to trade and opening its markets to more American goods.

Criticism of Nakasone was amplified by the fact that the prime minister admitted here yesterday that he had made the statements during a breakfast interview with Washington Post editors and reporters on Tuesday. During a press conference in Washington on Wednesday, Nakasone had denied making the remarks, which indicated a substantially larger military role for Japan than previously scheduled.

His sudden reversal came on his return from an official four-day visit to the United States yesterday and it brought widespread charges in the press here that he had betrayed the public trust. The controversy is expected to intensify Monday when the 1983 session of the Diet, or parliament, begins in Tokyo.

In Washington, Nakasone appeared to impress President Reagan and other senior administration officials with candid statements on defense and in the area of trade that were unusually bold for a Japanese leader.

Since coming to office Nov. 26, Nakasone has stressed the need to strengthen badly strained relations with the United States. He has used his flair for prompt political action to break through the bureaucratic red tape here that has, in the past, made progress on key issues between the two countries painfully slow.

Analysts say, however, that Nakasone's assertive posture on military issues in Washington has rocked the status quo in this peaceful, prosperous country of 117 million by overstepping a public consensus that is slowly coming to favor a modestly expanded defense role for Japan.

During Nakasone's tape-recorded interview with The Washington Post, the Japanese leader indicated that Japan's air defenses should be strengthened to erect "a tremendous bulwark of defense against infiltration" of Soviet Backfire bombers. In explaining his later denial to reporters in Washington, Nakasone said in Tokyo yesterday that he had "misunderstood" a reporter's question about the statement and mistakenly thought it referred to subjects discussed with President Reagan.

The issue, he said, "did not arise during discussions with President Reagan. But during the breakfast meeting with the Washington Post I did say that. What I meant was that, in case of a military emergency, Japan should have flawless lines of defense."

In making the about-face, Nakasone stressed that an expansion of Japanese military forces would be carried out under the strict provisions of the country's Constitution, which limits them to a purely defensive role and renounces war as an instrument of national policy.

The explanation, however, has failed to defuse heated charges in the press and political circles here that Nakasone has, in effect, committed Japan to a major military buildup far beyond what is now planned. An editorial in today's edition of Yomiuri Shimbun, a major national daily, noted that Japan's current five-year defense plan, which runs to 1987, provides for the purchase of only 138 F15 jet fighters--"too small a force to make Japan an 'unsinkable aircraft carrier.' "

According to senior defense analysts here, building up air defenses capable of detecting and stopping overflights by Soviet Backfire bombers would oblige Japan to double its present number of sophisticated air bases and radar installations. The costs of such a venture, they said, would require Japan to boost its yearly military budgets to a figure just under 2 percent of the country's gross national product. Tokyo now restricts its defense spending to under 1 percent of GNP, a ceiling that commands widespread public support here.

The Asahi Shimbun chided Nakasone for his statement in the Post interview of his aim to make Japan able to bottle up submarine and surface ships of the Soviet Pacific Fleet in the Sea of Japan by controlling strategic straits. The newspaper said, "This obediently follows the United States' anti-Soviet military strategy" and threatened Japan with the possibility of unprovoked Soviet military reprisals.

A thorough study of the taped interview by Japanese speakers disclosed that Nakasone said in Japanese that the straits should be closed "in case of emergency" but that this phrase was not translated into English by his interpreter.

The Japanese reacted nervously to a commentary in Tass, the official Soviet news agency, which warned Japan Wednesday of a possible retaliatory attack should it build up its defenses along the lines suggested by Nakasone. Tass said, "Is it not clear that in the present nuclear age, there can be no unsinkable aircraft carrier?" The Soviet statement, which was carried in front-page reports by all major Japanese newspapers, drew on powerful emotions in the land of Hiroshima and Nagasaki.

Yanosuke Narazaki, a leader of Japan's small United Social Democratic Party in the Diet, said, "Why should Japan, as an independent country, commit 'double suicide' with the United States?" Ichio Asukata, chairman of Japan's Socialist Party, the largest opposition political group, and a leader of the strong pacifist lobby in parliament, called Nakasone's remarks in Washington "unconscionable political double talk."

Nakasone, who has long been known for his hawkish views on national defense, has been under increasing fire from opposition politicians for a recent decision to allow Japan to free the flow of its military technology to the United States. The move was the first major shift in Tokyo's 15-year policy of banning virtually all weapons-related exports. Nakasone has also been under sharp attack for recent statements encouraging a public debate on the rewriting of the war-renouncing Constitution.

Analysts here predicted Nakasone will face a stormy political agenda when the 1983 Diet session opens Monday, although they said it was too early to tell how effectively the country's badly splintered opposition parties may be able to make good on threats to block the passage of key legislation. In an apparent response to the current controversy, Nakasone told Japanese reporters in Washington shortly before his departure that he might be forced to combat a political upheaval at home by dissolving the Diet and calling for early elections. Nakasone's ruling Liberal Democrats now control an absolute majority of votes in both houses of parliament.

Reflecting the criticism of Nakasone among conservative elements here, including inside his own party, the strongly proestablishment Sankei Shimbun, another major daily, said the prime minister's handling of his comments in the Post interview had created "a sense of distrust among the Japanese people." While the newspaper applauded Nakasone for his directness in dealing with U.S. officials, it warned that he will have added new strains to Tokyo-Washington ties unless he is now able to deliver on his pledge of a stronger role for Japan in the military sphere.