TO THE EXTENT that there is a loyal opposition inside the Soviet Union, Roy Medvedev, a scholar, a Marxist and a former Communist Party member, is its most visible spokesman. In his cramped Moscow study and despite his often debilitating insomnia, Medvedev writes prolifically -- 11 books have appeared in the West in the past decade -- about historical and political subjects that are central to Soviet life. Consider these latest two: the one is an update of his classic study of Stalin, Let History Judge; the other is a survey of the Bolshevik revolution. Both deal with subjects as sensitive and complex as any the Kremlin has.

Innumerable volumes have appeared on these matters, of course. But what makes Medvedev worthwhile is his special perspective. Neither orthodox party apparatchik nor disaffected emigre, Medvedev is in a position to offer a dryeyed, informed and generally readable assessment different from that of more ideologically rigid writers.

Because he stands outside the system -- over his objections, he was expelled from the party in 1969 as a result of his opposition to the Russian invasion of Czechoslovakia -- Medvedev is considered a dissident. He is usually grouped with such figures as Alexander Solzhenitsyn and Andrel Sakharov as a leading intellectual critic of the post-Stallin era. Yet he has very little in common with other prominent dissenters who would gasp at assertions such as that in the preface of The october revolution: "Only by stopping and looking back critically over the path we have travelled without being afraid to condemn forthrightly our own oversights, mistakes, even crimes, can we Marxist revolutionaries achieve success both in our practical and our theoretical aims."

It is this fundmental faith in the possibility, as he puts it in On Stalin and Stalinism, of a "harmonious combination of democracy and socialism" that makes Medvedev something of a philosophical oddity on the Soviet scene, at least as we perceive it in the West.

Indeed, while he admires the courage and literary skills of Solzhenitsyn, Medvedev is almost as critical of him as he is of the Soviet rulers. Solzhenitsyn's position, Medvedev angrily wrote several years ago, reinforces the "most reactionary circles, sentiments and institutions" in the Kremlin. And Solzhenitsyn doesn't think much of Medvedev either. In fact, Medvedev has been entangled any number of times in feuds with other Soviet dissenters -- all of which, I suspect, appeals to his ornery nature as a man who enjoys having his very own perch from which to preach.

The two relevant questions here for assessing Medvedev's significance are first: Just how good a scholar is he? And second: Do his views reflect an important segment of opinion in the U.S.S.R.?

On the first point, Medvedev's academic training was as an educator. He taught at a Moscow pedagogical institute. He told me in a long biographical interview we had in Moscow in 1975 that his interest in political history began as an avocation when he decided to collect material on the excesses of the Stalin period. From this he developed his very effective reserach technique of using not only all available official records but also the enormous quantities of unpublished material that Soviets keep privately. With the help of his twin brother Zhores, a scientist who had his Soviet citizenship revoked while he was abroad in 1973, Medvedev began receiving considerable Western material as well.

Although harassed on occasion by Soviet authorities and long since fired from his job, Medvedev has managed to go on working. The results are what amounts to a book a year. Some are more serious than others. For instance, his monograph eontending that a former White Russian soldier, and not Nobel laureate Mikhail Sholokhov, authored And Quite Flows the Don makes fascinating literary detective reading, but according to other scholars Medvedev is basically wrong. On Stalin and Stalinism is a series of observations on the late dictator that adds little of significance to what we already know -- about the man or Medvedev's views on him. The Other Revolution puts forth a revisionist Marxist view of that momentous event which, as Harrison Salisbury notes in the foreword, may leave Western readers with as "much to question as to accept."

Nevertheless, both books are worthwhile because they continue to provide an analysis of Soviet history and politics from a critical but not unsympathetic stance. For us in the West, that flow of information is essential for a better understanding of the Kremlin.

As to how many people in the U.S.S.R. share his belief in the potential for a more humanistic communism, there is no way of really knowing, but it is certainly more than a valiant few. After all, "socialism with a human face" sprang up in a matter of months in Czechoslovakia in 1968 to replace doctrinaire Stalinism. The direct comparison is misleading because Czechoslovakia and Russia are very different places. Still, the idea that there are "liberals" inside the Soviet body politic should not be dismissed.

In all our conversations in Moscow, Medvedev insisted that he had many friends and philosophical soulmates in the country. To Americans that should be a reassuring notion because it leaves open the chance that the Kremlin we now regard with such suspicion and hostility might some day be less forbidding. Medevdev insists he's not pessimistic about the development of socialism. Let's hope he's right.