Yes, you can.
Without a compass you will be able to use non compass dependent flight modes such as stabilize, altitude hold and manual.