A spokesman for Sen. John W. Warner (R-Va.) said yesterday Warner expects James R. Spencer, an assistant U.S. attorney in Richmond, to be nominated and confirmed as Virginia's first black federal judge.

Spencer, 36, was one of three candidates whose names Warner sent last month to Attorney General Edwin Meese III. A spokesman for Warner, Peter Loomis, said the White House told the senator a few days ago that the FBI was performing the usual background checks on Spencer.

"I am confident that based on his outstanding qualifications, Mr. Spencer's nomination will be sent to the Senate, and that he will be confirmed," Warner said in a statement issued by his office.

News of the preliminary move toward nominating Spencer drew praise from James Ghee, president of the state NAACP, and from John W. Scott Jr., a Fredericksburg lawyer and official of the predominantly black Old Dominion Bar Association, which recommended Spencer to Warner. Both said the appointment would make Virginia the last of the former Confederate states to gain a black federal judge.

But Rep. Herbert H. Bateman (R-Va.), who is lobbying for another man for the job, criticized Spencer as having "no roots and familiarity or standing" in the district. Spencer, a native of South Carolina, has worked in Virginia for 2 1/2 years.

Spencer, reached at his office late yesterday afternoon, declined to comment on Warner's announcement.

The lifetime federal judgeship, which pays $78,700 a year, is one of nine on the U.S. District Court for Virginia's Eastern District, which covers Alexandria, Richmond, Newport News, Norfolk and the Hampton Roads area.

President Carter nominated black lawyer James E. Sheffield in 1980, but the nomination died in the U.S. Senate after a tussle between the White House and Sen. Harry F. Byrd Jr. (I-Va.).

Spencer is a Harvard Law School graduate who worked as an assistant U.S. attorney in the District before taking a year off to obtain a divinity degree from Howard University and moving to Virginia. He is not known as a Republican activist, a contrast to the two other men whose names Warner sent to the White House. They are Shannon (Skip) Mason Jr., a Newport News lawyer favored by Bateman, and Wayne Lustig, a lawyer in Norfolk and close ally of Rep. G. William Whitehurst (R-Va.). All three won an approval rating from the state bar association.

Ghee said he knows Spencer only "vaguely," but described him as "an excellent candidate and would make a model jurist . . . . "

If the nomination goes through, Ghee said, "It would indeed be a step in the right direction -- a long time in coming and one he [Warner] should have done years ago."

But Rep. Bateman said there had never been a federal judge in the Eastern District who comes from his congressional district, and it is an "outrageous oversight or inequity" that an outsider could be nominated. Bateman said he has nothing against Spencer, but "I don't like the idea of someone trying cases in my district who is from some remote area."

A spokesman for Whitehurst, David Bushnell, said the congressman was disappointed that Lustig apparently was not selected, but "he respects the decision" to nominate someone else.