Absolutely. Corned beef is the classic ingredient in this sandwich, but pastrami makes an excellent substitution if that's what you've got.