If my game is free but contains (non-required) paid items, should I pay the 5% profit as well?

I want to develop a free game, but it charges specific non-mandatory items. Is this allowed?

Yes, you will owe royalties on all gross revenue, including those items listed in Section 5.b of the EULA:

b. Gross revenue resulting from any and all in-app purchases, downloadable content, microtransactions, subscriptions, sale, transfer, or exchange of content created by end users for use with a Product, or redemption of virtual currency, either within a Product or made externally but which directly affect the operation of the Product;