DC to AC conversion and filter wave shaping
The problem starts with the square wave.I'm not sure if it should go below 0 or if it's ok to let it vary between 0 and +5V for example.


Obviously, a DC offset in the input wave doesn't matter to the output – it won't pass through the transformer. 

So you can use pretty much any periodic function. Since you said yours is a scientific question: 

make yourself a plot of the spectrum of the periodic function you apply to the input (spectrum = Fourier transform!). You know that all periodic function have line spectra. The zero-mean square wave has lines in its spectrum spaced every 1/period – that's pretty handy, because that means that you can put your low pass somewhere betweeen 1/period and 2/period, which implies it can have pretty relaxed transition between pass- and stopband.

The triangle is just a square wave convoluted with itself. That's awesome – because convolution in time domain is multiplication in frequency domain, which means that the triangle wave's spectrum is just the squared spectrum of the square wave, so the same filter can be used. However, for practical reasons: It's a lot harder to produce a good triangle wave than a good square wave, and especially if you consider switching losses, fully switched semiconductors are usually much more efficient. 

Also, from a practical point of view: your transformer already is an inductive device – and you might very well get away by adding a capacitor in series instead of having RC lowpasses on the input, which would give you a resonant circuit around the frequency you feed in, with (virtually) no power lost, solving the DC offset problems at the same time.