A Smithfield police officer got a family safely out of a burning house early Monday, the fire marshal said.