How to make this AC amplifier better
Probably the easiest way to improve on what you've done, to get rid of those power-wasting resistors, while still maintaining the cheapness and simplicity of the original, is to do this. 

It's not an 'audio' amplifier, just like your original isn't. It's purely designed to take weak logic-level signals, and drive a speaker with them.







simulate this circuit &ndash; Schematic created using CircuitLab

Use two, one from each logic pin, and bridge-tied to your loudspeaker.

There is a small loss of voltage due to the transistor VBE. That can be overcome with additional components, but it's probably not worth it at this level.