Pit bull shot dead by police officer after it attacked a man