Determination of the weak phase gamma from rate measurements in B+- ---> pi K, pi pi decays