US President Barack Obama has said "I screwed up" over his handling of a controversy that led two politicians to decline posts in his administration.