The administration of Gov. Charles S. Robb today endorsed the controversial principle of merit pay for Virginia teachers, but proposed a one-to-two-year $500,000 pilot project to "work out the bugs" before implementing it statewide.

Higher pay for "master teachers," embraced by President Reagan as the cornerstone of his plan for improving public education, is opposed by teachers' groups around the country who say that it would promote favoritism by school administrators.

State Secretary of Education John T. Casteen told the House Appropriations Committee that the governor's plan would reward superior teachers with $1,000 cash payments and $2,500 "master fellowships" under which they would hone their skills at a statewide "center for educational improvement."

These master teachers, limited to no more than 5 percent of the total number of teachers in a school district, also would be eligible for $2,500 grants to purchase new instructional materials and equipment such as computer terminals or word processors to use in their classrooms, Casteen said.

The Virginia Education Association immediately announced that it has strong reservations about the concept, but said that it wants time to study Robb's proposals before deciding whether to fight them in the General Assembly.

"To this point in time, I have not seen a merit pay plan that works," said David L. Johnson, executive director of the Virginia Education Association, which represents about two-thirds of the state's 65,000 public school teachers.

The merit pay proposal is the latest in a series of recent initiatives by Robb in the field of education. Last Friday he proposed a $166 million plan to give a 20 percent pay raise to the state's teachers during the 1984 and 1985 fiscal years, to bring Virginia teachers' salaries up to the national average.

Three weeks ago the governor publicly urged the state Board of Education to adopt more stringent academic standards for high school students, including more mathematics and science courses and a special "advanced studies" curriculum for college-bound students that some critics have denounced as "elitist."

Casteen told the committee at a hearing today that the idea of the merit concept is to build on the master teachers' expertise by having them teach courses to their colleagues on how to improve their classroom performance.

In order to limit backlash of the type that recently defeated a merit pay proposal in Tennessee, Casteen said that the program will begin as a "modest" pilot project in only one to three school districts and involve only 100 to 200 teachers. Although the project officially is slated to last for two years, Casteen says he hopes it may receive its entire $500,000 appropriation next year, so the General Assembly can act on a statewide plan in its 1985 session.

"There are bugs that have to worked out," Casteen explained when asked why the administration did not offer a statewide proposal at the outset.

The pay raise is a major component of the $545 million increase for the Department of Education that Robb has targeted in his still developing 1984-1986 budget, Casteen disclosed today. Under that increase, the state's basic per-pupil payments to local school districts would climb from the current $1,464 to $1,604 two years from now.

Higher across-the-board pay, such as Robb proposed on Friday, often has been cited by teachers' groups as an essential prerequisite before they would even entertain a merit pay proposal. But, as VEA director Johnson emphasized today, that alone is not enough to win acceptance by the teachers.

At the heart of the teachers' opposition is a belief that the selection of master teachers would become a political process in which school principals and other administrators would "play favorites" among the faculty, according to Johnson. Casteen suggested that such fears are unfounded. He added that the way around the difficulty is to include teachers in the development of merit pay proposals that would be submitted by local school districts to the state board of education. The board then would choose which district's proposals should be funded under the pilot project.