Give the teachers a base pay. Then, they get a percentage of a bonus amount. The percentage is calculated based on the percentage of the students in the teacher's class meeting grade level standard at the end of the year. The teachers will figure out how to teach them. Money, especially if the bonus could be 20-30000, is a big motivator, but those bonuses are still cheaper than the failed programs usually tried.
Q: what if a teacher gets assigned a poorly performing cadre of students?
A: assign the kids randomly to teachers. The ups and downs will average out.
Q: what if the teacher cheats on the year end tests?
A: have an independent authority do the testing
Q: what if the teacher teaches to the test rather than anything valuable?
A: change the test so that passing it reflects learning