Can we trust encryption when the random number generator is compromised?
No. For example, if you are doing AES-128 and your flawed pseudo random number generator creates a 128-bit key, where the key due to flawed random number generation can only be one of 2^40 (10^12 ) options (that are well distributed and appear random), it would be possible for a governmental attacker to simply try all 2^40 options to try brute-forcing your AES-128 key. Many more attacks of this sort are described on wikipedia.
I don't think its fair to assume that the NSA has compromised encryption by simply compromising all random number generators. It's probably a multi-faceted approach that ranges from compromising hardware, software (both open source software by submitting new features with subtle flaws) and closed-source software (either develop it yourself, or pay someone off to alter the source code right before it ships), certificate authorities, standards, infiltrating and paying off organizations (like paying RSA Security $10 million to default to Dual EC DRBG with its "rather-obvious" ability to be backdoored). Possibly even involves number theoretic advances like the ability to break easily factor prime numbers or solve discrete logs which would undermine RSA and ElGamal encryption.
Speculation
My guess is no on this number-theoretic front -- if the government could very easily break RSA moduli easily, then why did they have to shutdown lavabit when the founder refused to give away his private SSL key (versus let him continue to operate and decrypt the traffic anyway). My personal guess is a lot of it tends to be nonsensical designs that allow programming "mistakes" that undermine security through side-channel attacks like Heartbleed, or software with deliberately introduced flaws (open-source with mistakes like heartbleed or closed-source through modifications secretly made), or hardware with major vulnerabilities in the design. Yes, it sounds like a conspiracy theory, but to quote the NY Times reporting on leaked Snowden documents:
The N.S.A.'s SIGINT Enabling Project is a $250 million-a-year program that works with Internet companies to weaken privacy by inserting back doors into encryption products.