With ‘as’ you will always need an article. However there are other uses of ‘penalty’ where that is not the case.
The practice is outlawed under penalty of life imprisonment.
(You could add ‘a’ or ‘the’ here, but it isn’t necessary and usually worse. ‘Under’ is somewhat formal)