A Brentwood police officer was killed Monday in a shooting at a house that eventually exploded and was consumed by flames.