There are three options:
1) Change authorized_keys after each user modification.
2) Use OpenSSH with a custom PAM module or patch that does database lookups.
3) Use an SSH library to implement a custom server that only handles git pushes and does database lookups.
We have not decided which method to use yet.