Preheat the oven to 350°F and line two baking sheets with parchment paper.
In a large bowl, combine the sorghum flour, tapioca starch, oat flour, apple pie spice, baking soda, and baking powder.
Place the cubed butter into a large bowl and beat the butter just to break it up. Add the sugar and cream until smooth, beating the mixture for about 1-2 minutes.
In a small bowl, whisk together the milk, flax seed and oil, then add it into the butter and sugar.
Gradually add the dry ingredients, about 1/4 cup at a time, into the creamed butter and sugar.
Roll the cookie dough into balls and place them on the prepared cookie sheet. Make an indent in each cookie, using your thumb or a spoon.
To each indent in the cookies, add about 1 tsp of apple filling, and bake for 10 or 12 minutes.
Cool the cookies on a cake rack while making the caramel.