Anatoly Shcharansky met for nearly 40 minutes yesterday with President Reagan and other senior officials at the White House, but reporters were not invited and no details of the conversation were released because Reagan wanted to continue practicing "quiet diplomacy" to advance human rights in the Soviet Union, according to spokesman Larry Speakes.

Although Speakes said that Soviet human rights could best be advanced quietly, Shcharansky, who is visiting the United States for the first time after being released Feb. 11 from a Soviet prison, seemed to disagree.

"Quiet diplomacy, from my point of view, can help only if it is supported by strong public pressure, so that for the Soviet Union there will be no illusions that the question of human rights, the question of Soviet Jewry, the question of emigration are all very closely related to their economic and political interests," Shcharansky said.

"I am sure that my release would never have been possible if there were not such a strong, open campaign for me, and if President Reagan personally did not take such a strong, open position on my behalf. I am very grateful to him and I expressed these feelings to him," Shcharansky told reporters outside the White House.

He also complimented the president: "I was surprised by how deeply President Reagan understands that [Soviet] system and how to deal with it."

The White House emphasis on "quiet diplomacy" yesterday echoed its decision in March not to have Reagan meet with Yelena Bonner, the wife of Soviet physicist Andrei D. Sakharov, who is now held in internal exile in the Soviet city of Gorki, east of Moscow. Bonner, who is in this country for medical treatment, was received only by John M. Poindexter, Reagan's national security affairs adviser.

Reagan "doesn't want to do anything to lessen the chances of others being released," a White House official said in March. "He's told a lot of people that he doesn't want to rock the boat."

Before his meeting with Reagan, Vice President Bush, Secretary of State George P. Shultz, Poindexter and White House chief of staff Donald T. Regan, Shcharansky stood in the Capitol Rotunda where he was given a standing ovation. Sen. Robert J. Dole (R-Kan.) called him "an authentic hero in the struggle for human possibilities."

Diminutive, balding, comic at times, Shcharansky did not look like a man who endured nearly nine years of harsh treatment in Soviet prisons. Wearing a tie for the first time in 21 years, Shcharansky seemed as fidgety as a teen-ager. Then he rose to speak.

"The time has not yet come for us to rest on our laurels," he said. "I am released but 400,000 Soviet Jews are still kept as prisoners of the Soviet Union.

"No amount of bargaining, of give and take, of mutual concessions, can take the place of trust. Experience has taught the Jews of the Soviet Union, has taught me while I was in the camps struggling against the KGB, that lesser demands and fewer expectations lead to a situation where our aggressors feel that they should be rewarded for cosmetic concessions," Shcharansky said.

Jewish activists say that 400,000 Soviet Jews have applied for exit visas but that only 1,140 were allowed to leave in 1985.

Shcharansky urged Congress to "maintain and reinforce" the Jackson-Vanick Amendment to trade laws passed in 1974 denying "most-favored-nation status" to countries that deny their citizens the right to emigrate.

As Shcharansky spoke, many in the audience wiped tears from their eyes. When the ceremony was over, dignitaries and other guests mobbed him.

Since his dramatic walk across the Glienicke Bridge in East Berlin three months ago, Shcharansky, 38, has been living in Jerusalem with his wife, Avital. She is pregnant and did not accompany her husband on his 10-day trip to the United States.

Shcharansky, who has adopted the Hebrew name Natan, has spent much of his time speaking out for Soviet Jewry, beginning work on a memoir scheduled for publication in fall 1987, and coping with what he has called the "ocean of love" that has come with his new role as living symbol.

Shcharansky, who received the key to the District of Columbia yesterday from Mayor Marion Barry, will meet with more congressional leaders today