A West Sacramento officer shot and killed an attacking dog on Tuesday night as he was assisting someone to their home, the police department said.