How can I generate dynamic keynote presentations?

You could create your keynote presentation as a series of separate files (either slides, or sections, eg. slides 1-20, slides 21-25, slides 26-40) and then merging them using Automator. This way you could simply replace slides 21-25 with alternative versions prior to merging?