You can use AT89S52 instead; even this belongs to 8051 family of microcontrollers which has 8KB ISP flash memory space. There won't be any changes required in the code as such. If you are working with Keil uvision, make sure you change the microcontroller settings to this particular one.