Diophantine approximation with almost-primes and sums of two squares