Both sentences are fine. As far as I understand, verbs that are in the potential form also tend to use が in order to emphasize something. For example, saying 納豆が食べられますか you're emphasing if someone can EAT NATTO, whereas 納豆を食べられますか it's just a general "can you eat natto?" statement.
There's a thread I came across over a month ago where this subject was brought up. I found some info which I brought to it, so you can take a look: https://new.renshuu.org/forums...