How do I place a red block under a red team member who is on a white block?

/testfor is rarely used nowadays, because there are better ways:

/execute at @a[team=red] run fill ~ ~-1 ~ ~ ~-1 ~ red_concrete replace white_concrete