Answer:
You do not specify the units of your pit, so I will assume feet. 40' x 10' x 8' is 3200 cubic feet. Multiplying by 123 (cubic inches per cubic foot) gives you 5,529,600 cubic inches. Dividing by 231 (cubic inches per US gallon) gives you 23938 US gallons. Dividing by 42 (US gallons per bbl) gives you 570 bbls.
All of this is without required temperature or pressure conversion, which would be required if you were actually dealing with oil, because oil's density changes with pressure and temperature.