Macros can't check for whether or not an ability is on CD, so there's not really any way to do exactly what you're looking for. You basically have two imperfect options:
Code:
#showtooltip
/castsequence reset=6 Elemental Blast, Lightning Bolt, Lightning Bolt
Note that the reset=6 is sort of an arbitrary length of time, and 6s is probably the wrong one to pick, but I don't play Enh, so I don't know the average time between MW stacks. Castsequence reset starts after your last press, not your first, so you can't just use the CD of EB (12s). You have to sort of estimate how long you think you have between max MW stacks. The reason this macro is imperfect is you could potentially have a situation where you don't get enough stacks of MW in the 6s after casting EB, at which point the macro would try to cast EB again, but it's on CD for another 6s. You could also run into a situation where EB and MW are up 3s after your last LB cast, and you have to sit there and wait 3 more seconds for the macro to reset so you can cast EB.
Code:
#showtooltip
/cast [mod:shift] Lightning Bolt; Elemental Blast
This is a simple modifier macro, and probably your better option. It will cast EB by default, and cast LB if you hold down shift. You can change the modifier to ctrl or alt, as well. The reason I put it in that order is it will track your EB CD on the icon on your bar that way. If you want to switch them, I would recommend either doing #showtooltip Elemental Blast as the first line or if you use WeakAuras, Power Auras, or Tell Me When, you can track the CD on EB with one of those.