A widening sex scandal at Lackland Air Force Base had led to the dismissal of the top commander who oversees basic training for every new American airman, officials said Friday.