Alexandria school officials proposed raising school spending yesterday by about 8 percent and giving teachers 5 percent more pay but raised the possibility of teacher layoffs.

The $45.9 million budget for the next school year, presented last night to the school board, takes into account declining enrollment, inflation and uncertainties about federal and state aid. In an accompanying memo, school Superintendent Robert W. Peebles called the budget-making process "a dangerous juggling act necessitated by these times."

The board must approve a final version of the proposal by Feb. 24, when it goes to the City Council, which has the power to reduce the budget total. City Manager Douglas Harman has asked the school system to limit its spending increase to 8 percent.

The budget calls for reducing the number of teaching positions by 27, which Peebles said could lead to the system's first layoffs. There are 760 teachers in the system.

Another 20 nonteaching positions would be eliminated and transportation costs wold be cut by increasing the walking distance for secondary school students from a mile to a 1 1/2 miles.

School officials said the city stands to lose almost $300,000 next year in federal impact aid now given school systems that serve large numbers of children whose parents are federal employes. The officials also expect a 30 percent cut in federal funding for teaching disadvantaged children. New regulations governing the state's contribution to employe retirement funds could mean a loss of $440,000, Peebles said.

Nevertheless, Peebles told a reporter he thinks the budget "compares favorably with our surrounding school divisions." Fairfax County school officials have requested a 10.9 percent spending increase for the next school year and Prince George's school officials have asked for 9.1 percent more.

Alexandria school enrollment is expected to drop by 5 percent next year, although it declined less than 1 percent this year to its current total of 10,734. The budget contains no mention of school closings, but Peebles indicated in his memo that "it does appear likely that some school closings will occur in the next two to five years."

Alan Caudill, director of the Education Association of Alexandria, which claims a membership of 655 teachers, said he felt "pretty good" about the proposed teacher package.

A first year teacher with a bachelor's degree and no experience now earns $13,711 in Alexandria, compared to $14,224 in Arlington and $14,200 in Fairfax County.