Once you manage to get Twilight Walker or Attuner it unlocks the blocked masteries. I haven't managed to do it myself with the Elemental Archmage line, but I did manage to unlock Twilight Walker and Twin Soul on my demonkin MC. It's pretty nice being able to use both light and dark with the bonus damage and reduced mana cost.