Hi Sinem,
Grammatically "It was an electrical fire" is correct, so yes you could say that, but it depends on what you want to say. Maybe you want to say "it was an electric fire", which would refer to the heater (noun) that heats the room, whereas "electrical" is an adjective, and so describes the fire.
For the second sentence, I would say "the fire was started because of an electrical fault", so maybe there was a problem with the heater and therefore it started the fire.
Hope this helps,
Sinead