Yes you can. Simply create a digital product with the price set to 0 and create a shopping cart or attach the product to an existing shopping cart.
When you create a shopping cart with a free product, while choosing a payment gateway you will see "Free Item" as the available payment option:
Create your shopping cart and your customers will be able to complete the order and access the digital file.
An invoice will be generated and a sale will be added which you can retrieve in your "Sales" page.