A method for rapid determination of oil and water content in geological formations