Cook noodles according to package directions; generally this involves soaking in very hot water for several minutes and rinsing under cool water.
Meanwhile, make sauce by soaking tamarind pulp in boiling water in a small bowl, stirring occasionally, about 5 minutes. Force mixture through a sieve into a bowl, discarding seeds and fibers. Alternatively, dissolve tamarind concentrate in hot water. Add soy or fish sauce, brown sugar and Sriracha, stirring until sugar is dissolved.
Heat 1 1/2 cups oil in wok over medium heat until hot, then fry half of shallots over medium-low heat, stirring frequently, until golden-brown, 8-12 minutes. Carefully strain mixture through a fine-mesh sieve into a heatproof bowl; reserve oil. Spread fried shallots on paper towels to drain. Wipe wok clean.
Pat tofu dry. Reheat shallot oil in wok over high heat until hot. Fry tofu in 1 layer, turning occasionally, until golden, 5-8 minutes. Transfer tofu to paper towels to drain using slotted spoon. Pour off frying oil and reserve.
Lightly beat eggs and salt. Heat 2 T shallot oil in wok over high heat until it shimmers. Add eggs and swirl to coat sides of wok. Cook, stirring gently with a spatula, until cooked through. Break into chunks with spatula and transfer to a plate.
Heat wok over high heat until a drop of water evaporates instantly. Pour in 6 T shallot oil and swirl to coat side of wok. Stir-fry white and pale green scallions, garlic, carrots and remaining shallots until softened, about 1 minute.
Add noodles and stir-fry over medium heat (use 2 spatulas if necessary) for 3 minutes. Add tofu, 1 cup of bean sprouts, and 1 1/2 cups sauce and simmer, turning noodles over to absorb sauce, until noodles are tender, about 2 minutes.
Stir in additional sauce if desired, then stir in eggs and transfer to a serving dish.
Sprinkle pad thai with peanuts, fried shallots, and remaining scallions. Serve with lime wedges, remaining bean sprouts, cilantro sprigs, and Sriracha.