Yes you can.
The rule you're thinking about is bonus action spells.
You cannot use your action to cast a spell (except a cantrip) on the same turn that you use your bonus action to cast a spell.
If you have action surge there's no rule preventing you from using your 2 actions to cast 2 spells.