Quantum confinement of E1 and E2 transitions in Ge quantum dots embedded in an Al2O3 or an AlN matrix