Afghan President Hamid Karzai says about 40 people were killed in a US air strike and urges Barack Obama to act.