Yes they do the job of both rudder and elevator at the same time. They're called "ruddervators".
To provide normal input/output function, you have to operate the ruddervator surfaces through a mixer unit, a mechanical summing device that operates the two surfaces one-up-one-down when providing a yaw force, that is, when moving in response to a rudder input, and both-up-both-down when providing a pitch force, that is, moving in response to an elevator input.
So when you move the stick back and forth, both ruddervator surfaces move up and down together, and when you move the rudder pedals, they both move from side to side together. Moving both controls at the same time results in a "blended" result that achieves the required pitch and yaw force in proportion to the control inputs.
So, for example, stick half way back, both surfaces half way up. Hold the stick at that position, and apply right rudder, the right ruddervator will move toward neutral, and the left one will move up MORE. This keeps the original pitch force in place, while also inducing a yaw force to move the nose right.
You have to allow for the full aft stick + full rudder case in the geometry of the linkage and the travel range of the surface itself, meaning the travel range of the surface must be more than normally required for each movement individually. So, for example, you might give the surfaces themselves 30 degrees of range up and down. Full up elevator might move the left and right surface to 15 degrees up. Full up elevator AND full right rudder may move the LEFT side to 30 degrees up, whereas the right surface might move down to neutral. Move the stick forward a bit while holding the rudder input, and the left surface might come down to say 25 degrees, and the right surface might go below neutral a bit. To accommodate all this, you may have to make them bigger, partly negating the drag benefit of only having two.