Yes, you can!
You can modify your registration page URL to contain a discount code. This will automatically fill the discount code in the box. Here's an example URL:
The main URL should be the page containing your registration form shortcode.
?discount=CODEHERE on the end, where
CODEHERE is your discount code.
For the below discount code, my URL might be: http://example.com/register/?discount=half_off