Periods and Selmer groups associated to mod p Galois representations over imaginary quadratic fields