Your best option is to slice the apples up, then cut out and discard the worm tunnels (every last bit of them, as they contain worm droppings, ick). The rest is safe to eat.