Slice the tofu in half through the middle of the slab, then cut each piece in half. Place slices between paper towels to drain.
Combine sugar with 1/4 cup water in a small saucepan. Cook over medium heat until small bubbles appear around the edge of the pan; from this point forward, only swirl the pan, never stir. Cook 20-35 minutes, until the bubbles are thick and the syrup is a deep amber. Add 1/2 cup water (it will sputter violently) and swirl. If any sugar recrystallizes, stir carefully with a metal spoon. When the syrup is clear, turn off the heat.
Pour the caramel into a wide skillet over medium heat. Add the shallots and cook 2 minutes. Add the ginger and garlic and cook 1 minute. Stir in the soy sauce and cook 10 minutes, until the vegetables are well coated and the sauce is thick and viscous.
Add the tofu slices in one layer and cook, uncovered, 7 minutes.Carefully turn the slices over and cook another 3-4 minutes. Transfer to a warm platter. Pour the sauce over the tofu, scatter with scallions and sprinkle with black pepper. Serve with white rice.