The U.S. military says a man dressed in an Afghan army uniform has shot and killed two U.S. soldiers outside a top security prison near Kabul .