The same was as you would optimise a static site. There's no reason why Page titles, H1, alt tags etc can't be pulled from a database.
Most things are similar as when you would optimize a static site. One thing you could do is work on getting seo-friendly keyword-rich urls instead of having ?param=whatever