A statewide voter survey released today by the Richmond Times-Dispatch showed John W. Warner by six percentage points in a surprisingly close race for the U.S. Senate.

The poll gave Miller 34 percent to Warner's 28 with more than one-third of those questioned still undecided in a contest that many though Miller had begun well ahead.

The Times-Dispatch poll, published in today's editions of the Richmond morning newspaper, is the first public release of a statewide survey in the Senate race.

The Miller campaign earlier claimed a "comfortable lead" on the basis of an August poll and Warner had acknowledged that he was "trailing but gaining" on the basis of early polling data.

A random sample of 677 registered voters was questioned in the Times-Dispatch survey over a nine-day period beginning Sept. 16. John B. Mauro, director of research for Media General Inc., parent company of the newspaper, said the age, income, not vary significantly from known statewide population characteristics.

Mauro said the results of the poll reflect actual preferences among registerd voters at the time of the survey within four percentage points, plus or minus.

Of those questioned, 35 percent said they had not decided how to cast their Senate vote and another 3 percent declined to answer. Of those who expressed a preference, 22 percent said they might change their mind before the Nov. 7 election, 4 percent were unsure whether they would change and 74 percent said they would not.

The Times-Dispatch released the response to only one question probing factors that might affect voter preferences. Those questioned were asked whether they thought Warner's wife, actress Elizabeth Taylor, would help his chances of winning election.

Forty-one percent said she will help, 34 percent said she will not, 23 percent did have any opinion and 2 percent did not answer.

The Times-Dispatch survey was begun barely a month after Warner became the GOP nominee, replacing the late Richard D. Obenshain, who was killed in an Aug. 2 plane crash.

Miller, on the other hand, had been campaigning since his June 10 nomination. He also began the race with higher name identification than either Warner or Obenshain because of his seven years as state attorney generl and his unsuccessful $1.4 million campaign for the Democratic nomination for governor last year.

Miller won his party's nomination for the Senate at a convention this year largely on recognition that he was the best known of the eight Democratic candidates and the most likely to reverse the party's sagging fortunes in statewide elections.

The beginning of the nine-day survey coincided with a controversial statement by Warner in a television interview that he tried as secretary of the Navy to slow efforts by former chief of naval operations Elmo R. Zumwalt to speed up racial integration of the service.

The controversy was greatly intensified by a Warner effort to persuade Washington television station WJLA to alter the tape of the interview on grounds that Warner had misunderstood the question.

Zuwalt later said that Warner in fact had not hindered his integration efforts, but he criticized his former boss for failing to push affirmative action programs and for general indecision as secretary.

The survey was completed about the time Warner agains got into trouble by endorsing former president Gerald R. Ford for the GOP presidential nomination in 1980.

The endorsement, given in answer to a question in a televised debate, came days before Ford rival Ronald Reagan came to Virginia to campaign for Warner and it outraged conservatibe Virginia Republicans who are fervent Reagan supporters.

The survey was completed before the period of most intense campaign activity, including widespread media advertising by the candidates, and the results disclose a large bloc of undecided voters might be swayed by effective campaigning. Campaign and party officials have reported a low level of interest in the race throughout the state up to now.

As the survey got under way, Warner began what appears to be a massive direct mail operations, designed to appeal to special interest groups and to the regional interests of those who receive the letters. Warner campaign spokesman Bill Kling declined to describe the direct mail operation yesterday for tactical reasons.

Miller does not appear to have a similar mailing effort under the way. He and his staff acknowledge that the campaign is hampered by lack of funds.

Moreover, the volunteer effort for the moderate-conservative Miller was threatened last week by the revelation that he has decided to exclude controversial party liberal Henry E. Howell from a formal role in his campaign.

Howell defeated Miller in last year's bitter Democratic gubernatorial primary and has offered to do anything he can for Miller this year. Howell loyalists who have been working for Miller, especially in Norther Virginia, were openly upset by Miller's failure to give their champion a conspicuous campaign role.

Like all such surveys, the Times-Dispatch poll was not intended as a prediction of the outcome of the election. During the last two general elections in Virginia, however, the newspaper conducted surveys that showed former president Ford and Republican Gov. John N. Dalton holding leads in races that they eventually won. Virginia was the only southern state carried by Ford in 1976.

During the last 10 years of Republican ascendary in statewide elections in Virginia, all GOP candidates, including presidential nominees, who eventually won in the state started out behind in their own polls, except in one instance. Former president Nixon led in all state polls on the way to his landslide victory over Democratic candidate George M. McGovern in 1972.

The Times-Dispatch survey showed that the percentage of Virginia voters aligned with the major political parties is still lwo and perhaps still declining. Only 32 percent identified themselves as Democrats, 16 percent as Republicans and the rest - more than half - said they are "independents" or not affiliated with any party.

Of those questioned, 14 percent were black, a percentage consistent with most estimates of the percentage of registered black voters in the state.