On a Diophantine problem with one prime, two squares of primes and $s$ powers of two