On Witten's extremal partition functions