If we've only observed Oumuamua as a single pixel, how can we know its shape?
Nobody "knows" the shape of Oumuamua. However there are standard ways of deducing the objects likely shape based on assumptions, and this methodology has been tested agains asteroids for which their shape has been checked by other methods, including delay-Doppler radar (see Is delay-doppler radar imaging of NEO asteroids possible only if it spins fast enough? for example) and measurements from deep-space spacecraft that have approached and even orbited individual asteroids.
This answer to Could asteroid 'Oumuamua actually be round? shows a preliminary light curve and a simulation based on some assumptions of albedo and rigid-body rotation dynamics. It's not likely we will ever know its shape for sure, at least not with current capabilities of space travel, so this kind of analysis is the best that can be done.
For a more thorough analysis and modeling of Oumuamua's light curve see for example Modeling the light curve of `Oumuamua: evidence for torque and disc-like shape.