I wouldn't recommend doing that. It would be acceptable to do per the NEC if you made the splice in a properly listed enclosure. It may not be per code based on your local codes. I would either cut back the old cable and run it intact to the location you wanted the new receptacle or run an entire new cable from your breaker panel to the receptacle location. I would then match the receptacle to what the air compressor is designed to use.