Simple answer: it's not plural.
Rambam addresses the apparent plurality of the word Elohim in the מורה נבוכים, The Guide for the Perplexed. He addresses it for the sake of explaining passages where it sounds like Elohim could imply God is corporeal, but I think we can use his teachings to address this first passage.
He states that its common knowledge that in Hebrew, Elohim is a word that can designate the diety (singular), the angels (plural), and the rulers governing the cities (plural), later he adds Judges (I.2 & II.6). And Onqelos gives an accurate translation of it. In the Creation passage he translates it simply as Yod-Yod, a singular name of God.
So when Elohim is describing God, it is the singular form of the word, but if the word is describing angels and rulers then it can be plural.
You could also say the name "Elohim", when referring to the Diety imparts the many definitions of the word to God. So while God himself is singular, his attributes are plural. He is the God of gods Ruler of rulers, Judge of judges (all referring to his superiority above the angels).
In chapter I.61, Rambam says that "all the names of God, may He be exalted, that are to be found in any of the books derive from actions" (except the name Y,H,V,H). And he says in II.6, 'God only acts through an angel (messenger)'.
If we then take it all and tie it together then we can interpret "Elohim" in first passuk to mean (the singular) God (Elohim) creates the heavens and earth through the use of his messengers/angels/rulers/judges (Elohim), of which God is the ruler (Elohim), and Judge (Elohim).
the guide of the perplexed I
the guide of the perplexed II