Using Different Screw in Drywall Anchors
No one can tell you for sure since there are many varieties and sizes of drywall anchors.  I suggest you get some anchors which have screws roughly the same diameter as your shelf screws.  Then try them out in some inconspicuous spot on your wall. See if the anchors are holding firmly in the wall. You could even try mounting the shelf and testing it. Ultimately, it also depends on the weight of the items that will go on your shelf.