Afghan officials say an Afghan security officer opened fire on U.S. troops while conducting a joint operation with them , killing two and wounding two others .