On the sum of two primes and k powers of two