President Reagan yesterday nominated D.C. Court of Appeals Judge Stanley S. Harris to be U.S. Attorney for the District of Columbia. Reagan also announced his choice for a federal judgeship in Virginia.

The formal nomination of Harris, expected to be confirmed promptly by the Senate, ends a long search by the White House to find a Republican successor to U.S. Attorney Charles F.C. Ruff, who was appointed by former President Jimmy Carter in 1979.

Harris, 54, who has written more than 200 opinions since former President Nixon appointed him to the local appeals court in 1971, is viewed as a conservative judge who generally has sided with the prosecution in affirming criminal convictions in the the lower courts.

Recently, Harris joined the appeals court majority in upholding the constitutionality of a local law that allows judges to imprison defendants prior to trial without bond. Harris, who served for one year on the D.C. Superior Court as a trial judge before he joined the appeals court, also wrote an appellate decision that restricted the use of the insanity defense and, in another decision, made it tougher for defense lawyers to question rape victims about their past sexual activity.

Once it became known early last month that Harris was the Reagan administration's choice for the top prosecutor's job, Harris immediatelywithdrew from participation in any criminal cases that were being heard before the appeals court.

Harris, a native Washingtonian whose father led the Washington Senators to their only World Series title in 1924, graduated from the University of Virginia Law School in 1953 and was a partner in the Washington law firm of Hogan & Hartson before being named to the local bench.

The White House also announced yesterday that President Reagan has nominated Martinsville, Va., lawyer Jackson L. Kiser to a U.S. District Court judgeship in the western district of Virginia.

Kiser, a 1952 graduate of the Washington and Lee University law school, worked as an sssistant U.S. attorney from 1958 until 1961 when he began private law practice in Martinsville. He now is a partner in the firm of Young, Haskins, Mann, Gregory & Young.

Sen. John W. Warner (R-Va.) also announced yesterday that Reagan is expected to nominate Norfolk lawyer Robert G. Doumar to the U.S. District Court in the eastern district of Virginia, which includes the Northern Virginia suburbs. Doumar is the current president of the Virginia Conference of Local Bar Associations.