Any person who has been indicted for an offense punishable by death may enter a plea of guilty at any time after his indictment, and the judge of the superior court having jurisdiction may, in his discretion, sentence the person to life imprisonment or to any other punishment authorized by law for the offense named in the indictment; provided, however, that the judge must find one of the statutory aggravating circumstances provided in Code Section 17-10-30 before imposing the death penalty, except in cases of treason or aircraft hijacking.