When saying qunoot in witr salah (at end of salat al layl), and when praying for the forty believers, can I say 40 prophets and infallibles?

Yes you may state: 40 prophets.