Are you talking about the anime writer's decision to use Pikachu, or are you asking if Ash was originally going to get a Pikachu in the original episode? I'll answer both.
The anime writer's decision to use Pikachu
Only the anime writers really know the answer to this question, however I doubt it was the fact it was Electric type that made Ash get the Pikachu. I've believed for a long time that they chose Pikachu because it appealed to the media, and wasn't considered more boy-like or girl-like to most people. They wanted to be able to advertise the anime with a character that people would remember, so they chose Pikachu.
This theory is backed up by the fact they were originally going to give Ash a Clefairy. Clefairy is definitely a more feminine-looking Pokemon, so they changed it to Pikachu because it was more balanced. Pikachu also has more interesting attacks; it is much more interesting to see an electric mouse create thunderbolts than it is to watch a Clefairy attack.
Was Ash supposed to get a Pikachu?
No, Ash wasn't actually supposed to receive a Pikachu. In the first episode on the anime, Ash is late to Professor Oak's lab, and he finds that all three of the starter Pokemon, Squirtle, Bulbasaur and Charmander, had all been taken. Oak instead gave him the Pikachu, which disliked Ash at first but warmed up to him eventually.